Where do I put a JavaScript alert override so that all pages can use it without importing a JavaScript file?
I’ve overridden the alert method. I want to be able to use it from any .aspx page without importing it on each separate page.
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.
You can put all of the JavaScript code in the code behind and register it with
Page.RegisterStartup.For example, put it in the master page or from a page from which that all others pages derive. But it’s not a good idea to do it.