本文介绍了带vb的asp中的服务器端确认框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
早上好,大家好, 在执行一些代码行之后的按钮单击事件中,我想显示一个确认框,并基于最终用户的响应,我想执行其余代码行. 问候, Rajashekar.
Hi goodmorning all, In button click event after executing some lines of code I want to display one confirmation box and base on end-user response I want to execute remaing lines of code. Regards, Rajashekar.
推荐答案听起来像您在寻找这种控件的声音:一个简单的ASP.NET服务器控件:消息框和确认框 [^ ] Sounds like you are looking for this kinda control: A Simple ASP.NET Server Control: Message Box & Confirmation Box[^]
您可以显示一个JavaScript窗口. 请参阅此处 [ ^ ]或此处 [ ^ ]. You could display a javascript window. See here[^] or here[^].
您能否发布函数"Msgbox(您的消息",VBOK)" 但无法将值分配给hiddenfield Can u please post the function "Msgbox("Your Message",VBOK)" but am unable to assign the value into hiddenfield public void ReturnValue() { ClientScriptManager CSM = Page.ClientScript; string strconfirm = " <script language='javascript' type=text/javascript>" + "var hdn1 = document.getElementsByName(hdnField'); " + " var savresult=confirm('Do You want to delete all documents and its versions?'); " + " if(savresult==1) " + " {" + " hdn1.value='1'; " + " alert(hdn1.value);" + " } " + " else " + " { " + " hdn1.value='0'; " + " alert(hdn1.value); " + " } " + " </script>"; CSM.RegisterClientScriptBlock(this.GetType(), "Confirm", strconfirm, false); //ClientScript.RegisterClientScriptBlock(this.GetType(), "onclick()", strconfirm.ToString(), false); Response.Write(hdnField.Value); }
但无法将值存储到hiddenfield中.
but am unable to store the value into hiddenfield.
更多推荐
带vb.net的asp.net中的服务器端确认框
发布评论