I can get simple examples to work fine as long as there's no master page involved. All I want to do is click a button and have it say "hello world" with the javascript in a .js file, using a master page. Any help very much appreciated 🙂
Jquery – How to use JQuery with Master Pages
asp.netjquerymaster-pages
Related Question
- Javascript – Setting “checked” for a checkbox with jQuery
- Javascript – How to redirect to another webpage
- Javascript – How to check whether a checkbox is checked in jQuery
- Jquery – How to select an element with multiple classes in jQuery
- Javascript – Disable/enable an input with jQuery
- Javascript – How to refresh a page with jQuery
- Javascript – How to return the response from an asynchronous call
Best Solution
EDIT
As @Adam points out in the comments, there is a native jQuery mechanism that basically does the same thing as the hack in my original answer. Using jQuery you can do
My hack was originally developed as a Prototype work around for ASP.NET and I adapted it for the original answer. Note that jQuery basically does the same thing under the hood. I recommend using the jQuery way, though, over implementing my hack.
Original answer left for comment context
When you use a master page, ASP.NET mangles the names of the controls on the dependent pages. You'll need to figure out a way to find the right control to add the handler to (assuming you're adding the handler with javascript).
I use this function to do that:
Then you can do something like:
where you have the following on your child page