Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In my web application i have written the code for alert display box if password is wrong
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Email or Password is Incorrect.')", true);

when alert box appears it comes with white background or it disturbs background like images and text when i have clicked ok it goes back to normal i have tried the
RegisterStartupScript
too whatever i do it gives same problem please help to solve this error.
Thank you.
Posted

That is just the functionality of the "alert" feature of whatever browser you are using and it can't be changed. If you want more control of the box you'll need to use a custom javascript modal box. jQuery has one as part of their UI library that supports a greater level of customisation.

http://jqueryui.com/dialog/[^]
 
Share this answer
 
Use the below code

C#
Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Hi This is Melwyn Fernandes');", 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