Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted
Updated 18-Oct-10 19:29pm
v2

Sounds like you are looking for this kinda control: A Simple ASP.NET Server Control: Message Box & Confirmation Box[^]
 
Share this answer
 
You could display a javascript window.
See here[^] or here[^].
 
Share this answer
 
Can u please post the function "Msgbox("Your Message",VBOK)"

but am unable to assign the value into hiddenfield

XML
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);
       }


but am unable to store the value into hiddenfield.
 
Share this answer
 
Use In-built Function : MsgBox()[Message Box]

Msgbox("Your Message",VBOK)
 
Share this answer
 
Comments
Sandeep Mewara 19-Oct-10 2:24am    
It's a ASP.NET question and not winforms!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900