Purushottam Rathore
How to display Alert in JavaScript and ASP.NET
By Purushottam Rathore in ASP.NET on Feb 14 2012
  • pradeep sahu
    Apr, 2012 25

    alert("message");

    • 1
  • manoj prabakaran
    Apr, 2012 9

    we can display alert box from asp.net code-behind that is

    1. ScriptManager.RegisterStartupScript(this,GetType(),"alertmsg","alert('hahahahah');",true);





    • 1
  • Swa M
    Mar, 2012 29

     IN order to Show MessageBox you can add the MessageBox Class in your page and use MessageBox.Show("Your Message");


    Link for MessageBox Class



    • 1
  • piyush sardhara
    Mar, 2012 13

     #region :: Alert Messege ::
        public void showalert(string msg)
        {
            string script = "";
            if (!Page.IsStartupScriptRegistered("ClientScript"))
            {
                Page.RegisterStartupScript("ClientScript", script);
            }
        }
        #endregion

    • 1
  • sri minu
    Feb, 2012 28

    Response.Write("alert('Hello');");

    • 1
  • Pratik Shirse
    Feb, 2017 10

    below mention script how to write on button click with server side confirmation in asp.net

    • 0
  • Pugal Pillaree
    Jan, 2016 9

    Response.Write("")

    • 0
  • Manish Kumar Choudhary
    Nov, 2014 21

    ///

    /// 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."));

    • 0
  • sreeranga prasad sane
    Nov, 2014 21

    page.registerstartupscript("sss","alert('student details not avlible')");

    • 0
  • sreeranga prasad sane
    Nov, 2014 21

    Page.RegisterStartupScript("ddd", "alert('student details not avalible')");

    • 0
  • sreeranga prasad sane
    Nov, 2014 21

    Page.RegisterStartupScript("ddd", "alert('student details not avalible')");

    • 0
  • Devesh Singh
    Jun, 2014 11

    Response.Write("alert('Duplicate files not allowed');");

    • 0
  • Anil Kumar Yadav
    Apr, 2012 30

    Response.Write("javascript:alert('Your message');");

    • 0
  • Bhupendrakumar Tiwari
    Mar, 2012 5

    You need to drag script manager and then type the follwing code wherever u required

    ClientScript.RegisterClientScriptBlock(typeof(Page), "test", "");

    • 0
  • Purushottam Rathore
    Feb, 2012 14

    Write this line of code to diplay the alert message. Response.Write("alert('Hello Puru!!!')");

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS