ASP.NET Javascript alert
You can use this C# function to call a Javascript alert:
private void ShowMessage(string msg)
{
RegisterStartupScript (System.Guid.NewGuid().ToString(),
string.Format("< script language='JavaScript'>alert('{0}');< /script>",
msg);
}


Hello, this is quite good but it has a little error – I’ve tried to use it in ASP.NET 2.0 and it should be something like this:
private void ShowMessage(string message)
{
RegisterStartupScript (System.Guid.NewGuid().ToString(), string.Format(“alert(’{0}’);”,message)) ;
}