Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.net javascript validation

Status
Not open for further replies.

monkeymeister

Programmer
Mar 17, 2005
58
0
0
GB
I have a method that I use in my C# for Javascript validation (see below). What I want to do is change the alert title, buttons, icon etc. Does anybody know the correct syntax to do this?

private void Gen_Alert(string Key, string msg)
{
string str = "";
str += "<script language='javascript'>";
str += "alert('"+msg+"')";
str += "</script>";
RegisterStartupScript(Key, str);
}
 
If your target audience uses IE-only (such as an intranet), you can use the VBScript "MsgBox" function to have more control:


Of course, if the page is for general internet use, your best bet if to write a custom DHTML box.

Hope this helps,
Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top