I have an ascx control that is loaded in an aspx page.
How can I instruct my ascx to run javascript once it is rendered in the browser.
It should run on every postback as well.
I looked around but could not find a satisfactory answer.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Have you tried using the “RegisterStartupScript” method along with JQuery to call a JS function?
This code might help you:
You can replace the alert with any JS function you want 🙂
I hope this helps.