mayank jain

mayank jain

  • NA
  • 7
  • 0

alert msg in asp.net

May 29 2009 9:03 AM

whn i use this code it works
private void OkayAction_Click1(object sender, System.EventArgs e)
{
String message = Resources.ValidationResources.blank;

 
String script = "alert('message')";

ClientScript.RegisterClientScriptBlock(
typeof(Page), "MyScript", script, true);
}
but this code doesnt work
private void OkayAction_Click1(object sender, System.EventArgs e)
{
String message = "hi";

 
 
String script = "alert(message)";

ClientScript.RegisterClientScriptBlock(
typeof(Page), "MyScript", script, true);
}
 
means i have to pick up value ant other method to do ths plz

Answers (3)