Click here to Skip to main content
15,904,023 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am adding some details..After adding I want to ask a confirmation to the user like
"Do u want to continue..?" If he click on YES I want to allow him to stay the
same page and add new values.If he clicks NO..I want to redirect him to
another page.

Please help me..
Posted
Comments
Karthik Harve 19-Apr-13 2:02am    
its a web application or windows application ?
kanamala subin 19-Apr-13 2:04am    
web application

The easiest way is probably to use JQuery (UI). It allows to popup dialogs. Via javascript you can then redirect the page to where you want.

JQuery[^]
JQuery.UI[^]

the library has a full API and sample code. Popping up a dialog is as easy as setting up a DIV and calling two lines of (jquery) javascript.

Hope this helps.
 
Share this answer
 
 
Share this answer
 
In .aspx write this java script


XML
<script type="text/javascript">
       function myTestFunction() {
           if (confirm('Do you want to add another global Space ?')) {
               return true;
           }
           else {
               window.location.href="/KB/answers/Dashboard.aspx";
               return true;
           }
       }
   </script>




and in code behind.........

call this after save \\


ScriptManager.RegisterStartupScript(this, typeof(string), "confirm",
"myTestFunction();", true);
 
Share this answer
 

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