ASP.net Some of the features in the Ajax library, and how to integrate with jquery. First look at the use of the client controls in the ASP.net Ajax library (The following example is a watermark textbox):
The following is a referenced content:
<title>untitled page</title>
<style type= "text/css" >
. WM {
color:gray
}
</style>
<!-- From CDN reference js-->
<script src= "Http://ajax.microsoft.com/ajax/jquery
/jquery-1.3.2.js "type=" Text/javascript "></script>
<script src= "http://ajax.microsoft.com/ajax/beta/0911
/start.debug.js "type=" Text/javascript "></script>
< Script src= "http://ajax.microsoft.com/ajax/beta/0911
/extended/extendedcontrols.debug.js" type= "Text/javascript "></script>
<script type=" Text/javascript ">
//Establish watermark
Sys.require (Sys.components.watermark, function () {
$ ("#TextBoxName"). Watermark ("< please input your name >", "WM");
});
</script>
The following are referenced by
:
<body>
<input type= Text "id=" Textboxname "size="/> //actual textbox
</body>
<title>untitled page</title>
<style type= " TEXT/CSS
WM {
Color:gray
}
</style>
<!--from the CDN reference Js-->
<script src= http://ajax.microsoft.com/ajax/jquery
/jquery-1.3.2.js "type=" Text/javascript "></script>
<script src= "http://ajax.microsoft.com/ajax/beta/0911
/start.debug.js "type=" Text/javascript "></SCRIPT>
<script src= "http://ajax.microsoft.com/ajax/beta/0911/extended
/ ExtendedControls.debug.js "type=" Text/javascript "></SCRIPT>
<script type=" text/ JavaScript
//Establish watermark
Sys.require (Sys.components.watermark, function () {
$ ("#TextBoxName"). Watermark ("< please input your name >", "wm");
});
</script>
<body>
<input type= " Text "id=" Textboxname "size="/> //actual textbox
</body>
Note that the above script is HTML code, with no slightest asp.net Server Code, simply simply through ASP.net Ajax The library and JavaScript are used to present the water print textbox (which also uses a little jquery syntax.) Looking back at the previous HTML and JavaScript Code, there are quite a few new technologies, including Ajax Script Loader, asp.net the client in the AJAX Library Controls if you are not going into Silverlight-rich world for the time being and want to be able to show better results on HTML pages, it's a good choice to tie in with VS2010 's ASP.net Ajax library. Since the ASP.net Ajax library is now an open source Cross-browser platform for Cross-platform JavaScript library projects, you can imagine that you can also use it in ASP, PHP, or other pure WEB application development technologies.