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

ajaxµÄʹÓÃÎÊÌâ

ajaxʹÓÃÖÐÓöµ½¼¸¸öÎÊÌ⣬Çë¸÷λ°ïæ¡£

1¡¢Ê¹Óà alert(xmlhttp.responsetext); µ¯³öµÄÈ´ÊÇÕû¸öÒ³ÃæµÄHTMLÎı¾¡£
2¡¢Ê¹ÓÃxmlhttp·¢³öµÄÇëÇó£¬ÔÚÁíÒ»Ò³ÃæµÄPage_LoadÀͨ¹ýÓï¾äµÃµ½Ò»¸ö±íµÄÖµ£¬ÈçºÎ½«Õâ¸ö±íµÄÖµ·µ»Ø£¿È»ºóͨ¹ýAJAX½«·µ»ØµÄÖµ¸³¸ø±¾Ò³Ò»¸öultrawebgrid?



ÏÈ°Ñhtml´úÂëÇå¿ÕÁË.

»òÕßÇëÇó.ashx or webservice

1.ÇëÇóaspxÒ³Ãæʱ¼ÓÉÏresponse.end()
2.ûÓùýÄãÄÇÍæÒâ

ÔÚÁíÒ»Ò³ÃæµÄPage_LoadÀͨ¹ýÓï¾äµÃµ½Ò»¸ö±íµÄÖµ
dsΪһ¼Ç¼¼¯
DTΪ±í
  DT = ds.Tables("Prod")
    If DT.Rows.Count > 0 Then
      Response.Write()'ÔÚÕâÀïÔõôдȡÕâ¸ö¼Ç¼¼¯Õâ¸ö±íµÄÖµ£¿

    End if


1.°ÑÄãµÄAJAXÇëÇóµÄASPXÒ³ÃæµÄHTMLÒ³Ãæȫɾµô£¬¾ÍÁôÏ·þÎñÆ÷¶ÎµÄ±êʾ <%..........%>ÄÇЩ¶«Î÷
2.ÄãµÃµ½µÄÊÇÒ»¸öDT,Ҫȡһ¸ö±íµÄÖµ£¿É¶Òâ˼£¬ÄãÒªÊÇҪȡ·µ»Ø±íµÄÊ×ÐÐÊ×ÁоÍÊÇDT.Rows[0][0].tostring();ÒªÊÇÒª·µ»ØÕû¸öDT£¬ÄǾÍÂé·³µãÁË£¬ÄãµÃ°ÑDTµÃÊý¾Ýת»»³ÉXML£¬·µ»ØXML£¬»òÕßת»»³ÉJSON£¬·µ»Ø¶¼ÐÐ...

ÇëÇó.ashx

1, È«²¿html ,˵Ã÷ÄãÍü¼ÇдÉÏ respon.write.end() ·½·¨
2. ·µ»ØµÄ±í,ҲҪת»»Îª×Ö·û´®, ¿ÉÒÔÊÇxml¸ñʽ, Ò²¿ÉÒÔjson ,
¹Ø¼üÊÇÄãÔÚǰ̨ÈçºÎ´¦ÀíÕâ¸ö·µ»ØµÄÊý¾Ý.Ö»ÄÜдjs Ò»¸öÒ»¸ö°ó¶¨

¹ØÓÚµÚ¶þµã£¬ÄÜ·ñÔÙ°ï˵¾ßÌåµã¡£¾ÍÊÇ·µ»ØÕû¸öDT¡£ÈçºÎתΪXMLÊý¾Ý£¬Ð»Ð»¡£

ajaxÇëÇóµÄÄǸöaspxÎļþÕâÑùд
<%
//´úÂë
%>

ÆäËûµÄ¶¼²»Òª£¬aspx.csÎļþÒ²²»Òª

LZµÄд·¨Ã»Óùý£


Ïà¹ØÎÊ´ð£º

ASP.NETÀïµÄÒ»¸öAJAXµÄ´íÎó


ÎÒµÄÒ³ÃæÀïÓõÄAJAX¿Ø¼þ µ«Ò³Ãæ¾²Ö¹Ò»¶Îʱ¼ä¾Í»á³öÏÖÉÏÃæµÄÒ»¸ö´íÎóÊÇÔõô»áÊÂѽ Ôõô½â¾ö°¡
¸ßÊÖ°ï°ïæ°¡

½«ÏîÄ¿Éϼ¶Ä¿Â¼ÖеÄÖÐÎÄÃû³ÆÈ«²¿¸Ä³ÉÓ¢ÎÄ

Â¥ÉÏ˵µÄºÜÇå³þÁË¡£°ï¶¥Ò»Ï°É

Õâ¸öÎÊÌâ²»ÊǺܳ£ ......

ajax <scriptmanager>µ÷ÓÃwebserviceµÄÎÊÌâ

ÓÃwindow.setIntervalÕâÑùµÄJS´úÂë5Ãëµ÷ÓÃÒ»´Î£¬½á¹ûIE±¨¾¯£º
¸ÃÒ³ÃæÉϵĽű¾Ôì³ÉieÔËÐлºÂý£¬Èç¹û¼ÌÐøÔËÐÐÄãµÄ¼ÆËã»ú»á±äµÃ¸üÂý£¿
´úÂëÈçÏ£º
<body onload="gLStat()">
  &nbs ......

¹ØÓÚajax¿Ø¼þNumericUpDownExtenderµÄʹÓÃÎÊÌâ

ÎÒÓÃNumericUpDownExtender£¬ÉèÖÃÁ˶ÔÓ¦µÄÒ»¸öÎı¾¿ò£¬

<cc1:NumericUpDownExtender ID="nctk4"  runat="server"
                ......

[ÏòchinmoÌáÎÊ]Çë½ÌAJAX¼ÓÔض¨Î»µÄÎÊÌâ

ÏÖÔÚÓÐÁ½¸öÒ³ÃæAºÍB£º

ÔÚAÒ³ÃæÓÐÒ»¸öÁ´½Ó£¬ÊÇB.aspx#commentµÄÐÎʽ

Ò²¾ÍÊǶ¨Î»BÒ³ÃæµÄêµã£¬¶øÇÒBÒ³ÃæµÄÄÚÈÝÊÇAJAX¼ÓÔصģ¬

µ±¼ÓÔØÍê³ÉºóÎÞ·¨×¼È·¶¨Î»µ½Ãªµã£¬

¹À¼ÆÊÇÒ»´ò¿ªBÒ³ÃæʱҳÃæ ......

»ùÓÚAjaxµÄ¸öÈ˲©¿ÍÍøÕ¾ÕýʽÉÏÏߣ¬É¢·Ö

¾­¹ýÒ»¸öÐÇÆڵIJ»¶ÏŬÁ¦£¬ÎҵĻùÓÚAjaxµÄ¸öÈ˲©¿ÍÖÕÓÚ¿ÉÒÔÕýʽÉÏÏßÁË¡£
ÏÖÔÚÉ¢·Ö½ÓÊܸ÷λ´óÏÀµÄ±ÉÊÓ¡£
ÍøÖ· www.bleehome.cn  BLEE HOME

(±¾À´Ïë¶àÉ¢µã£¬µ«ËµÎÒÖ»ÄÜÉ¢100.Õâ¸öµ½Ê±ÔÙÏëÏë°ì·¨)
~j ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ