alert .Ok click
-
there is an alert box that get displayed when necessary on webform1.aspx page..Now when i click on ok on alert window, the page should get redirected to webpage2.aspx... Is there any solution? something like... alert("alert message here",alert.OK, function ).....something like this..
-
there is an alert box that get displayed when necessary on webform1.aspx page..Now when i click on ok on alert window, the page should get redirected to webpage2.aspx... Is there any solution? something like... alert("alert message here",alert.OK, function ).....something like this..
-
Just put the code to redirect the page after the code that displays the alert box. --- b { font-weight: normal; }
-
STILL THE PAGE STAYS WHERE IT IS WHEN I INSERTED THE CODE ALERT..AND LATER SERVER.TRANSFER CODE IT DOESNT WORK FOR ME
-
ha ha...You got me wrong Guffa... Here comes my code...
if(username == checkname) { string strmessage1 = "UserID" + " " + username + " " + "already Exists!!"; RegisterStartupScript("scripta","alert('" + strmessage1 + "');"); } Server.Transfer("test.aspx");
That was the code..After alert displays on page..I click OK..and page doesnt process anymore..I see the samepage without redirecting to test.aspx after alert display -
ha ha...You got me wrong Guffa... Here comes my code...
if(username == checkname) { string strmessage1 = "UserID" + " " + username + " " + "already Exists!!"; RegisterStartupScript("scripta","alert('" + strmessage1 + "');"); } Server.Transfer("test.aspx");
That was the code..After alert displays on page..I click OK..and page doesnt process anymore..I see the samepage without redirecting to test.aspx after alert displayYou are mixing up server side code with client side code. 1. The server side code is run on the server to create the page. 2. The page is sent to the browser. 3. The browser parses the page and runs the client side scripts in it. The Server.Transfer will be executed at the first step, and the alert will be executed at the third step. --- b { font-weight: normal; }