我用的是VS2003点击按钮Button3之后会弹出对话框,选确定,传s7=3的值到A.aspx页面上,选取消,传s8=7的值到A.aspx页面上一下语句能实现这个功能,但问题是为什么要点两下Button3按钮才弹框?private void Button3_Click(object sender, System.EventArgs e)
{
string s7="3"; string s8="7";
Button3.Attributes.Add("onclick", "if(confirm('你确定要执行操作吗?')) window.location=A.aspx?uid="+s7+"';else window.location=A.aspx?uid="+s8+"'; return false;");
}
{
string s7="3"; string s8="7";
Button3.Attributes.Add("onclick", "if(confirm('你确定要执行操作吗?')) window.location=A.aspx?uid="+s7+"';else window.location=A.aspx?uid="+s8+"'; return false;");
}
解决方案 »
- 请问这种效果怎么弄啊,原来chinaren里面用过,是显示头像的!!!记录过,现在找不到了
- 有人知道怎么用超链接来查询不同条件的数据
- 有参数的Action怎么实现,急急急
- Coalesys PanelBar for ASP.NET 控件的使用
- 关于淘宝!!
- System.Web.HttpRequest 并不包含 dataset 的定义
- ASP.net怎么访问不了一个类?请指点!
- 請問在客戶端不用web服務器的代理類,怎樣與web服務器進行數據交流
- SqlParameter 参数类型 ReturnValue 和 Output 有什么差别
- 难题求援:为什么在Aspx文件中无法引用类中的静态函数会出错,而在后台代码中引用正常呢?谢谢!!!
- .net未将对象引用设置到对象的实例
- 菜鸟小问。。。
如果不放心 可以在Add方法前面加上
Button3.Attributes.Remove("onclick");