alert("message");
we can display alert box from asp.net code-behind that is 1. ScriptManager.RegisterStartupScript(this,GetType(),"alertmsg","alert('hahahahah');",true);
IN order to Show MessageBox you can add the MessageBox Class in your page and use MessageBox.Show("Your Message");
Response.Write("alert('Hello');");
below mention script how to write on button click with server side confirmation in asp.net
Response.Write("")
/// /// showAlert/// public string showAlert(string msg){string message = msg;System.Text.StringBuilder sb = new System.Text.StringBuilder();sb.Append("");return sb.ToString();} and then call above function likeClientScript.RegisterClientScriptBlock(this.GetType(), "alert",showAlert("Student already admitted to this batch."));
page.registerstartupscript("sss","alert('student details not avlible')");
Page.RegisterStartupScript("ddd", "alert('student details not avalible')");
Response.Write("alert('Duplicate files not allowed');");
Response.Write("javascript:alert('Your message');");
You need to drag script manager and then type the follwing code wherever u requiredClientScript.RegisterClientScriptBlock(typeof(Page), "test", "");
Write this line of code to diplay the alert message. Response.Write("alert('Hello Puru!!!')");