Click here to Skip to main content
15,910,083 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Following are my code ...its redirecting to another page without showing alert message....

C#
obj.InsAttendance(Session["EmpID"].ToString(), (DateTime.Now).ToString(), "", DateTime.Today.ToString("dd/MM/yyyy"));

                  ScriptManager.RegisterStartupScript(this, GetType(), "displayalertmessage", "showalert();", true);
                   Response.Redirect("DashBoard.aspx");
Posted
Comments
Sergey Alexandrovich Kryukov 12-Apr-14 1:45am    
Why alert message? Do you mean that a user can deny redirection and stay on the same page?
—SA
Member 10310320 12-Apr-14 2:19am    
I want that after message user can redirect on another page.

1 solution

try this

Response.Write("<script>alert('Your Message')</script>");
 
Share this answer
 
Comments
Member 10310320 12-Apr-14 6:33am    
no its not working
MAYANK GEETE 12-Apr-14 7:17am    
ok..
Response.Write("<script>alert('Done');window.location='Default2.aspx'</script>");

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