Click here to Skip to main content
15,908,175 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
JavaScript
if (allowtoemail == totalemail)
{
   if (!this.Page.ClientScript.IsClientScriptBlockRegistered("ClsoeME91"))
      this.Page.ClientScript.RegisterStartupScript(this.GetType(),
      "ClsoeME91", 
      "<script language = 'javascript'>window.confirm('You can not send more email. Go to Pricing...');</script>");

// this is the confirm message if i click on ok then our two line below execute 

if I click on cancel then below code not execute how can i do

RadTabStrip2.SelectedIndex = 4; 
RadMultiPage2.SelectedIndex = 4; 

our above code is not working properly

how can do the correct this code......

Posted
Updated 9-Dec-09 5:09am
v3

1 solution

you might consider adding the ASP.NET tag to your ASP.NET questions, that's what the tags are for.

your code cannot work.  It will show this popup after a postback for a start, which is hardly efficient.  It also doesn't check the return value of the confirm call, therefore it always does the same thing.  Is it possible to do this check on the client side, you can add an OnClientClick event to a button and if it returns false, the postback will not occur.

 
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