c# - Validation on confirming Alert -


script

<script language="javascript" type="text/javascript">      function finalfunction() {          //your first script          return  confirm('are sure submit test?');      } </script>  <asp:button id="button1" runat="server" text="button" onclientclick="javascript:finalfunction();" onclick="button1_click" /> 

this script showing confirmation alert message either on clicking ok or cancel button, page redirecting page.

what want when click on cancel button, page should on same page, should not redirect page.

how do it?

onclientclick = "return finalfunction();"?


Comments

Popular posts from this blog

haskell - Using filter on an item in a list? -

c# - When does PreApplicationStartMethod actually get triggered to run? -

tomcat6 - Exception when stopping container for a with Spring + Quartz + Tomcat web application -