Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

[תÌû]asp.net Ajax ÖÕ¼«½â¾ö·½°¸

  ajax ÔÚÄ¿Ç° web ÁìÓòÒѹ㷺ӦÓã¬ÆäÕæÕýºËÐÄÖ»²»¹ýÊÇÒ»¸ö·â×°ºÃÁ赀 js ¿â¡£×îÎ廨°ËÃŵÄĪ¹ýÓÚ asp.net µÄ¿Ø¼þ£¬ÎÒ¸öÈËÈÏΪ ajax Ö»ÊÇÒ»¸öÇáÁ¿¼¶µÄ¶«Î÷£¬¸ù±¾Ã»ÓбØÒª½«Ëüд³É·þÎñÆ÷×é¼þ£¬Èç ajax.net¡¢AjaxControlToolkit µÈ¡£ËùÒÔÎÒÒ»Ö±ÊÓÕâЩ×é¼þΪÀ¬»ø¡£¡£¡£
ÒÔÏÂ˵Ã÷ÎÒΪʲô²»ÈÏͬ ajax µÄÏà¹Ø×é¼þ£º
1¡¢½« ajax ·â×°µÃÌ«ËÀ£¬³öÏÖÎÊÌâÄÑÓÚµ÷ÊÔ£»
2¡¢×é¼þ¹ýÓÚÓ·Ö×£¬Ì«¶àûÓÐÓõŦÄÜ£»
3¡¢ÒÀÀµÐÔÌ«Ç¿£¬ÉÙÒ»Ñù²»¿É£¬Èç webform£»
´«Í³µÄ ajax Ó¦Óõ½ÏîÄ¿ÖУ¬»á³öÏÖÓÉÓÚÏîÄ¿µÄ ajax Ó¦ÓÃÌ«¶à£¬·þÎñ¶ËµÄ ajax ÏìÓ¦º¯ÊýÄÑÓÚ¹ÜÀí£¬ÎÒÃǵ½µ×Òª°ÑÕâЩÏìÓ¦º¯Êý²¿ÊðÔÚʲôλÖã¿
¼ÙÈç
index.aspx ÀïÓÐÈý¸ö ajax ÏìÓ¦º¯Êý£¬ÎÒÃÇ¿ÉÒÔ°ÑÕâÈý¸öÏìÓ¦º¯Êý·ÅÔÚ index.aspx ÖУ¬²¢ÓÚ Page_Load ʼþÖиù¾Ý²ÎÊý²»Í¬À´µ÷ÓÃÕâЩº¯Êý¡£
index.aspx ÀﻹʹÓÃÁË abc.ascx£¬Õâ¸ö¿Ø¼þÀïÃæÒ²Óõ½ÁË ajax£¬ÄÇô abc.ascx ÀïµÄÏìÓ¦º¯ÊýÓÖÓ¦¸Ã·ÅÔÚÄÄÀindex.aspx ÖÐÂð£¿Èç¹û index2.aspx ÖÐÒ²Óõ½ÁË abc.ascx£¬ÄѵÀ»¹Òª¸´ÖÆ index.aspx µÄ´¦Àíº¯Êýµ½ index2.aspx£¬ÕâÑù¿Ï¶¨²»ÐУ»
ÎÒÃÇ¿ÉÒÔн¨Ò»¸ö ajax.aspx À´´¦ÀíËùÓÐµÄ ajax ÏìÓ¦£¬php/asp ¶¼¿ÉÒÔÕâÑù×ö¡£ÕâÑù¹ÜÀí»¹ÊDz»ÀíÏ룬
×îÀíÏëµÄ¹ÜÀí·½·¨Ó¦¸ÃÊÇÒ³Ãæ¡¢¿Ø¼þÓëÏìÓ¦º¯Êý¼¯³É¡£ICallBackEventHandler ¿ÉÒÔ×öµ½£¬µ«ÊÇËüÒÀÀµ webform£¬¼ÙÈçÄãµÄÒ³ÃæÖÐûÓÐÒ»¸ö £¬Ôò»áʧЧ¡£
ÎÊÌâ»Ø¹éµ½ÈçÌåʹÓÃÇáÁ¿¼¶ ajax£¬²¢ÊµÏÖÒ³Ãæ/¿Ø¼þÓë ajax ÏìÓ¦º¯Êý¼¯³É¡£
Reflector ²é¿´ System.Web.UI.Page ÀïÃæ´¦Àí ICallBackEventHandler Ä£¿éºó£¬ÎÒÃÇ¿ÉÒÔÕâÑù×ö£º
1¡¢ËùÓÐÒ³Ãæ¼Ì³Ð BasePage£»
2¡¢BasePage ¼Ì³Ð System.Web.UI.Page£¬ÖØд BasePage.OnLoad£»
3¡¢ÊµÏÖ AjaxHandler
4¡¢Ìí¼Ó Ajax À࣬ʵÏÖ Ajax.Register ¾²Ì¬·½·¨
´úÂëÈçÏ£º
public class BasePage : Page {
    protected override void OnLoad(EventArgs e) {
        AjaxHandler();
        base.OnLoad(e);
    }
    ajax handler#region ajax handler
    //ÎÒϲ»¶Óà json ¸ñʽÊý¾ÝÀ´·µ»Ø¸ø¿Í»§¶Ë´¦Àí
    protected void AjaxHandler() {
   


Ïà¹ØÎĵµ£º

ajaxÓëxmlÊý¾Ý½»»¥

ajaxÓëxmlÊý¾Ý½»»¥
AJAX¿ÉÒÔͨ¹ýʹÓÃXMLÎļþÀ´ÈÃÐÅÏ¢²úÉú»¥¶¯
AJAX XML ʵÀý
ÔÚÏÈÃæµÄAJAXʵÀýÖÐÎÒÃǽ«ÑÝʾÈçºÎÈÃWEBÒ³ÃæʹÓÃAJAX¼¼ÊõÀ´»ñÈ¡µ½À´×ÔXMLÎļþµÄÐÅÏ¢
´ÓÏÂÀ­¿òÖÐÑ¡ÔñÒ»ÅÌCD
Ñ¡ÔñCD: Bob DylanBonnie TylerDolly Parton
TITLE: Greatest Hits
ARTIST: Dolly Parton
COUNTRY: USA
COMPANY: RCA
PRICE: 9 ......

asp.net³£ÓÐС·½·¨ÕûÀí

  =================================<1>Ò³Ãæ¿ØÖÆ  ======================================
 <script type ="text/javascript"  src="../js/Calendar.js"charset ="gb2312"></script>
  <input ID="Text1" type="text" runat="server" onfocus="calendar()"/>
<!- ......

ASP.NET·þÎñÆ÷¿Ø¼þʹÓÃÖ®GridView

1         ASP.NET ·þÎñÆ÷¿Ø¼þGridViewʹÓÃ
±¾½Ì³Ì²»½éÉÜ·þÎñÆ÷¶Ë¿Ø¼þµÄ³ÊÏÖ£¬Ê¼þ´¦Àí£¬×´Ì¬µÈÀíÂÛ֪ʶ£¬Ö»½éÉÜ·þÎñÆ÷¶Ë¿Ø¼þµÄʹÓòÙ×÷£¬Èç¹ûÄú¶Ô·þÎñÆ÷¿Ø¼þµÄ֪ʶ¸ÐÐËȤ£¬Çë²ÎÔÄ¡¶ASP.NET·þÎñÆ÷¿Ø¼þ¸ß¼¶±à³Ì¡·
ÔĶÁ±¾ÎÄʱ×îºÃºÍ Îĵµ ¡¶ASP.NET·þÎñÆ÷¿Ø¼þʹÓÃÖ®Grid ......

ASP.NET´ÓSQL ServerÊý¾Ý¿âÌáȡͼƬ²¢ÏÔʾÔÚDataGrid

ʹÓÃGridview°ó¶¨Êý¾Ý¿âÖеÄͼƬ(תÔØ)
×¢£º´ËϵÁмǼÔÚÎÒʵ¼Ê¿ª·¢ÖÐÓöµ½µÄÎÊÌâºÍÊÕ²ØһЩ¼¼ÇÉÎÄÕ¡£
ÎÒÃǶ¼ÖªµÀ£¬ÔÚGridviewÖв»ÄÜÖ±½ÓÈ¥°ó¶¨Êý¾Ý¿âÖеÄͼƬ£¬ÎÒÃÇ¿ÉÒÔÀûÓÃHttpHandlerºÜÈÝÒ×µÄÍê³ÉÕâ¸öÈÎÎñ£¬ÔÚÕâÀïÎҼǼһÏÂÕâ¸ö¹ý³Ì¡£
1.ÉÏ´«Í¼Æ¬´æ´¢µ½Êý¾Ý¿âÖÐ
ÔÚÊý¾Ý¿âÖд´½¨Ò»¸ö±í£¬Ìí¼ÓÒ»ÏÂ3¸ö×ֶΣº
²½ÖèÒ»£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ