Click here to Skip to main content
15,886,137 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,
I am designing simple HTML page.
My requirement is when the page loads it should display alert message box with two buttons ie.OK
If i click OK buttons then the page will display.
How can i do this and i need to manipulate alertbox properties like
backgroundcolor
fontstyle
fontsize
height
width etc...
Thanks in Advance
Posted

 
Share this answer
 
You can use the OnClientClick on the button for this. Add a return confirm(); to it. It will create a javascript confirm dialog

JavaScript
<asp:button id="OkButton" runat="server" text="Signed" onclientclick="return confirm('Are you sure you want to continue?');"/>
 
Share this answer
 
v2

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