您的位置:程序门 -> .net技术 -> asp.net



问题.asp.net


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


问题.asp.net[已结贴,结贴人:kyot_ly]
发表于:2007-04-11 15:31:56 楼主
protected   void   button1_click(object   sender,   eventargs   e)
        {
                page.clientscript.registerstartupscript((typeof(string)),   "msg ",   " <script> ( '你确定吗! '); </script> ");
                response.redirect(ddlredirect.selectedvalue);
        }


这条语句,我想让它,先跳出来脚本,然后确定后再转向其它页,要怎么办.现在它跳不出来.
发表于:2007-04-11 15:47:051楼 得分:1
怎么不用if?
发表于:2007-04-11 15:51:382楼 得分:0
你用一下我看看.
发表于:2007-04-11 15:52:053楼 得分:0
我只是想知道为什么会这样,不跳出来窗口.
发表于:2007-04-11 15:53:294楼 得分:1
这样的直接写成javascript不行么?
发表于:2007-04-11 15:54:545楼 得分:2
protected   void   button1_click(object   sender,   eventargs   e)
        {
                page.clientscript.registerstartupscript((typeof(string)),   "msg ",   " <script> ( '你确定吗! '); </script> ");
                response.redirect(ddlredirect.selectedvalue);
        }

因为     ( '你确定吗! ');     前边少   alert   或者   confirm
alert( '你确定吗! ');
confirm( '你确定吗! ');
发表于:2007-04-11 15:57:546楼 得分:0
我试过了,加上也不是行.
发表于:2007-04-11 16:00:207楼 得分:1
response.write( " <script> alert( '更新成功! ')   ;location= '1.aspx '; </script> ");
这个语句能不能参考一下。
发表于:2007-04-11 16:04:358楼 得分:1
page_load事件写上
button1.attributes.add( "onclick ",   "return   confirm( '你确定吗 '); ");

button1_click事件只保留
response.redirect(ddlredirect.selectedvalue);
发表于:2007-04-13 17:25:229楼 得分:4
这句肯定不行的
发表于:2007-04-13 17:30:5710楼 得分:0
response.write( " <script   language= 'javascript '> alert( '您确定吗? '); </script> ");
response.response.redirect(ddlredirect.selectedvalue);
这样行不行?
发表于:2007-04-13 18:09:4811楼 得分:0
page.clientscript.registerstartupscript(typeof(string),   "msg ",   " <script> alert( '你确定吗! ');location= '1.aspx '; </script> ");


快速检索

最新资讯
热门点击