I am going to be doing a lot more front end work on one of our asp.net projects and I suspect there will be a lot more JavaScript involved. I have seen and used a lot of tutorials/info on the fundamentals of the JavaScript language but could someone point me towards some resources on JavaScript specifically for using it with asp.net? If specific tutorials/pages don't really exist then maybe some of the methods,tools,libraries etc. you would use and are worth reading about?
5 Answers
Here are some general resources to get you started - for some specifics of JavaScript vis-a-vis ASP.NET, see last two links:
JavaScript in Ten Minutes (PDF)
The Essentials of Writing High Quality JavaScript
Learn JavaScript, straight from the Gurus - Free JavaScript Video Lectures
24 JavaScript Best Practices for Beginners
Calling JavaScript from ASP.NET Master Page and Content Pages
Comments
Remember, that ASP.NET is (mostly) a server-side technology, and what it produces is simply HTML. So there's nothing really specifc to using javascript with ASP.NET.
What you should do, is to study and understand the HTML which is produced by the ASP.NET controls.
One important point is that the server-side control IDs do not correspond with the client-side IDs of the HTML element. E.g. you'll have to do things like this:
//aspx:
<asp:HyperLink id="myLink" ... />
//javascript:
var clientId = '<%= myLink.ClientID %>';
// access the client-side element using plain javascript and jQuery:
var linkJs = document.getElementById(clientId);
var linkJq = $('#' + clientId);
7 Comments
4 Comments
My suggestion would be to learn jquery which will make your life a lot easier. Another thing to keep in mind is that it doesn't really matter whether you are using asp.net or php or any other framework because javascript and associated libraries like jquery use HTML DOM objects and work on the client side.
A good book to learn jquery is Jquery in Action
Comments
EDITED:
W3Schools is NOT good for the basics of JavaScript
Once you get to grips with JavaScript you may find JQuery useful. Its a very neat and useful JavaScript Library
I'm looking to start web development and I've read a few tutorials, what are some good resources for learning more?I would not say ASP.NET because it isn't a good way to learn HTML. The question was about learning more JavaScript, not about how to shortcut many of the faults in the language. It's important to have a good understanding of the faults of the language so that you can make good use of the tools available, such as jQuery.