带vb.net的asp.net中的服务器端确认框 [英] Server side confirmation box in asp.net with vb.net
本文介绍了带vb.net的asp.net中的服务器端确认框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
早上好,大家好,
在执行一些代码行之后的按钮单击事件中,我想显示一个确认框,并基于最终用户的响应,我想执行其余代码行.
问候,
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.
推荐答案
听起来像您在寻找这种控件的声音:^ ]
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中的服务器端确认框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文