Saturday, December 29, 2007

C#: Display a JavaScript alert from ASPX

public static void ShowMessage(System.Web.UI.Page page, string message)
{
string sJavaScript = "";
page.RegisterStartupScript("MessageBox", sJavaScript);
}

1 comment:

  1. Its Wrong Coding.

    You are passing string message, where you substitue it.

    ReplyDelete

Please use your common sense before making a comment, and I truly appreciate your constructive criticisms.