3
Answers

alert msg in asp.net

mayank jain

mayank jain

15y
6k
1

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)