Hoody
Hoody

Reputation: 3381

javascript and asp.net

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?

Upvotes: 2

Views: 135

Answers (5)

Riain McAtamney
Riain McAtamney

Reputation: 6432

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

http://jquery.com/

Upvotes: -2

M4N
M4N

Reputation: 96596

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);

Upvotes: 2

shashi
shashi

Reputation: 4696

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

Upvotes: 0

Related Questions