Facebook

Friday, 27 July 2012

Script On Button Click

protected void btnScript_Click(object sender, EventArgs e)
       {
           if (txtdata.Text != "")
           {
               const string script = "alert('You have e')";
               ClientScript.RegisterClientScriptBlock(GetType(), "alert", script, true);
           }
           else
           {
               const string script = "alert('Please enter some data')";
               ClientScript.RegisterClientScriptBlock(GetType(), "alert", script, true);
           }
       }

No comments:

Post a Comment