如何弹出confirm文本框????

一直在冬眠 2011-11-28 04:39:26
我在.aspx.cs文件中,
ScriptManager.RegisterClientScriptBlock(UpdatePanel1, GetType(), "", "confirm('')", true);

在红色字迹区域我该如何写语句让其点击Yes是跳转到a.asp页面;点击No时,不改变。
...全文
302 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
forget_loves 2011-11-28
  • 打赏
  • 举报
回复
你的Yes和NO是哪里来的啊?
一直在冬眠 2011-11-28
  • 打赏
  • 举报
回复
我试了一下
这样是可以实现的
ScriptManager.RegisterClientScriptBlock(UpdatePanel1, GetType(), "", "if(confirm('successfully,Whether to examine the detailed information?')){location.href='a.aspx';}", true);
1800包吃包住 2011-11-28
  • 打赏
  • 举报
回复
        $().ready(function () {
$("#btnShowDialog").click(function () {
if (confirm("是否要跳转页面")) {
window.location.href = "a.aspx";
}
});
});
  • 打赏
  • 举报
回复
if(confirm('跳转?')){location.href='a.aspx';} return false;
ayzen1988 2011-11-28
  • 打赏
  • 举报
回复
return confirm('')

110,536

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧