how to call javascript function from server side in asp.net

here is the way if you want to access or call a javascript function on page load event of asp.net from server side

NOTE: make sure that this function is being called when a radio buttion will be checked. You can call it where ever you want as per your requirement.

protected void Page_Load(object sender, EventArgs e)
    {
      Rbtn_yes.Attributes.Add("onclick", "javascript:return EnableDesable()");
    }

Admin

A Software Engineer, Social Media Marketing Expert, writer,

Post a Comment

Previous Post Next Post