Tuesday, December 10, 2013

Call Jquery function from code behind



Below are the code for calling jquery function from asp.net code behind   

protected void Button_Click(object sender, EventArgs e)
    {
        string myScriptValue = "$(document).ready(function(){"+
          "your jquery code here”+
        "}); ";

        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "myScriptName", myScriptValue, true);

   
    }

No comments:

Post a Comment