当前位置: 动力学知识库 > 问答 > 编程问答 >

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?

网友答案:

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)

JavaScript Garden

Basic JavaScript

Eloquent JavaScript

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

Injecting Client-Side Script from an ASP.NET Server Control

网友答案:

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);
网友答案:
  • Javascript: The Definitive Guide, Third Edition by David Flanagan
  • JavaScript: The Good Parts by Douglas Crockford
网友答案:

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

网友答案:

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/

分享给朋友:
您可能感兴趣的文章:
随机阅读: