带vb.net的asp.net中的服务器端确认框

编程入门 行业动态 更新时间:2024-10-27 20:33:30
本文介绍了带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中的服务器端确认框

本文发布于:2023-11-24 21:34:19,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1626930.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:服务器端   vb   net   asp

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!