给asp:Button添加背景图片
今天为了以后的方便,我写了一些常用的用户控件。在写login控件时,有三个按钮,分别是登陆、重置、注册。我想中图片作为他们的背景来显示它们,但问题是asp:Button并没有提供background-image的属性。于是我就在网上搜了一下,有人提出用CssClass属性,方案是在css文件进行background-image的定义,如登陆.loginButton { background-image: url(image/login.gif);} 。但是我在调试时发现,在IE中效果可以呈现,但在Maxthon中却没有预期的效果。于是,我先在W3C的文件描述中进行改变,尝试了几次还是不行,后来,我干脆把 background-image改成background,测试了一下居然OK。又测试了几次,依然不爽。
相关文档:
asp常用的正则表达式实现字符串的替换,主要包括去除html标签,去除class标签和去除script标签等
去除html标签正则<\/*[^<>]*>
Function LoseHtml(ContentStr)
Dim ClsTempLoseStr,RegEx
ClsTempLoseStr = Cstr(ContentStr)
Set RegEx = New RegExp
RegEx.Pattern = "<\/*[^<>]*>"
......
using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
namespace W ......
JS:
//获取元素指定tagName的父元素 lxh 2009 03 10
function public_GetParentByTagName(element, tagName)
{
var parent = element.parentNode;
var upperTagName = tagName.toUpperCase();
while (parent && (parent.tagName.toU ......
public void Gridview_BindNoRecords(GridView gridView, DataTable dt) // gridView,绑定数据源DT
{
int a = dt.Rows.Count;
if (dt.Rows.Count == 0)
& ......
<!--#include file="conn.asp"-->
<!--#include file="inc/head.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn" lang="zh-cn" xmlns:q ......