onmouseover事件
onmouserover=this.style.backgroundColor='lightgreen'在datagrid中用onitemcereat事件,可以这样做
e.Item.Attributes.Add("onmouseover", "this.style.backgroundColor='lightgreen'")
onmouserover=this.style.backgroundColor='lightgreen'在datagrid中用onitemcereat事件,可以这样做
e.Item.Attributes.Add("onmouseover", "this.style.backgroundColor='lightgreen'")
解决方案 »
- 利用smtp发送邮件,是不是需要将附件保存到服务器上才能发送附件呢??
- 关于按钮触发的问题
- 关于ASP.NET线程同步,往数据库插入数据的问题
- 如何实现网页中用摄像头拍照(asp.net)?200请教,结贴再给100
- datetime数据类型在MS SQL Server 取值范围是1753-1-1到9999-12-31,那 ACCESS 中的日期范围是什么呢??
- World Wide Web Publishing Services找不到指定路径~!请问怎么设置路径啊!望高手帮忙啊
- 在编译asp.net工程时,release发布时,里面的try。。。catch 异常有没有用阿?
- SecurityException: That assembly does not allow partially trusted callers
- C#学完很郁闷。不知道怎么样来做aspx网页?各位赐教了!
- 如何实现在datagrid中进行数据统计?
- 微软的.NET Framework v1.1是不是疯了?还是我疯了?
- 如何实现页面内跳转??
e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFFFFF'") ;
e.Item.Attributes.Add("onmouseover", "this.style.backgroundColor='LightSteelBlue'") ;
e.Item.Style["cursor"] = "hand";
e.Item.ForeColor=Color.Blue;
都带有鼠标事件,能不能象样式表一样定义一个样式,而且当鼠标移动到标题栏时,会将标题栏的颜色发生变化,不可回复,另外我增加一个客户端事件:
e.Item.Attributes.Add("onclick", "xzst('','','','')")
问题是事件所用到的参数是DATAGRID中某列的数据,比如"XH"这一列,怎样将具体的数据传递到事件中,
谢谢各位,我在线等.
String ContractID = DataBinder.Eval(e.Item.DataItem, "ContractID").ToString();
e.Item.Style["cursor"] = "hand";
e.Item.ToolTip = ContractName;
e.Item.ForeColor=Color.Blue;
e.Item.Attributes.Add("onclick","window.open('Details.aspx?ContractID="+ContractID+"','_blank','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,revisable=no,left=100,top=0,width=600,height=550');window.opener=null;window.close();");
sub databound(sender As Object, e As DataGridItemEventArgs)
e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFFFFF'")
e.Item.Attributes.Add("onmouseover", "this.style.backgroundColor='LightSteelBlue'")
dim p_xh as string
p_xh= DataBinder.Eval(e.Item.DataItem, "xh").ToString()
e.Item.Attributes.Add("onclick","xzst('"+p_xh+"','','','')")
end sub报错:未将对象引用设置到对象的实例。
错误行: p_xh= DataBinder.Eval(e.Item.DataItem, "xh").ToString()
报错:未将对象引用设置到对象的实例。
错误行: p_xh= DataBinder.Eval(e.Item.DataItem, "xh").ToString()