c#中取不到showmodeldialog的返回值
protected System.Web.UI.HtmlControls.HtmlInputHidden txbConfirm;string confirmMsg = "<script> var a = window.showModalDialog('ConfirmYesNo.aspx','要继续吗?','dialogWidth: 350px;dialogHeight:80px;status:No'); document.all.txbConfirm.value = a;alert(document.all.txbConfirm.value);</script>";
Page.RegisterStartupScript("OpenModalDialog",confirmMsg);
this.logger.InfoFormat("txbConfirm: [{0}] ",this.txbConfirm.Value);
if (this.txbConfirm.Value == "-1") return;
上面的代码里,alert中能正确显示txbConfirm.value(showmodeldialog的返回值),但是c#中this.txbConfirm.Value变成空了。 --------------------编程问答-------------------- 问题紧急啊,我搞了好几天都没弄出来,高手们出来支支招啊 --------------------编程问答-------------------- http://www.google.com.hk/url?sa=t&rct=j&q=RegisterStartupScript&source=web&cd=3&ved=0CDMQFjAC&url=http%3A%2F%2Fblog.csdn.net%2Fnet_lover%2Farticle%2Fdetails%2F1780289&ei=p2TITs-SAoGWiQfYl5HsDw&usg=AFQjCNGVj2mXWLIcbCAbd-P5g_Ah890GOw --------------------编程问答-------------------- q107770540, 你的链接打不开啊 --------------------编程问答-------------------- 用 Request.Param["txbConfirm"]的方式取取看 --------------------编程问答-------------------- Request.Params
还有 如果txbConfirm 是动态添加的,给一个ID --------------------编程问答-------------------- bonnibell
,可不可以具体点
补充:.NET技术 , ASP.NET