1.use client script in the aspx page
2.use validator control
3.write client script by codebehind,for example there is a button named button1you can write the code ***button1.attribute("onclick")="javascript:alert('aaa')" in the cs file
2.use validator control
3.write client script by codebehind,for example there is a button named button1you can write the code ***button1.attribute("onclick")="javascript:alert('aaa')" in the cs file
解决方案 »
- Log4Net只能获取报在浏览器的错误吗?
- asp怎么实现图片管理
- SQL Server 2005实现数据库缓存依靠
- 连接服务器数据库
- 200分求解一问题,水晶报表方面的,做完程序后,在本机调试正常,移到服务器后,不能显示。提示未在规定时间获许可证。
- 求助-----在线等。。。。。急
- 我想去掉showmodaldialog打开的对话框的标题栏总是像是“人员选择——网页对话框”?
- 请问在程序中如何修改数据库?
- 我的空间数据库不给dbo权限,而我需要使用2.0的登录控件(无法使用存储过程)
- 在域控制器环境下用visual studio.net作开发的权限问题。
- 请问在sqlconnection对象用CLOSE和不用CLOSE差别大吗?
- 用C#编写asp.net程序时,如何调用oracle 数据库?谢谢解答!
Response.Write ("<Script>");
Response.Write ("alert('是否删除?')");
Response.Write ("</Script>");
我加分就是了!!
{
if (e.Item.ItemIndex >= 0)
{
LinkButton btn = (LinkButton)e.Item.Cells[10].FindControl("Linkbutton2");
btn.Attributes.Add("onClick","javascript:return confirm('确定要删除该条记录吗?');");
}
}
10是索引号
出现如下错误
未将对象引用设置到对象的实例。
然后,确定你的“删除”的linkbutton所在的列的索引号和你程序中的是否 一致,假如你有10列,“删除”在最后一列,则索引号为9
最后,确定你的“删除”连接的id和你findcontrol()里面的参数是否一致
LinkButton btn = (LinkButton)e.Item.Cells[10].FindControl("Linkbutton2"); 这里,“删除”按钮德id是Linkbutton2在我这里运行一些正常
如何得到返回的是“确定”还是“取消”
实在是不知道findcontrol()里面的参数是什么啊!!
到那里找啊!