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

jquery ajaxѧϰ

http://hi.baidu.com/cxzhang/blog/item/0166563892cc65fbb211c7b0.html.
http://topic.csdn.net/t/20030527/22/1842509.html
using System;
using System.Data;
using System.Text;
using System.Collections.Generic;
using System.Reflection;
public class ToJson
{
    /// <summary>
    /// datatable to json
    /// </summary>
    /// <param name="dt"></param>
    /// <returns></returns>
    public static string DataTableToJson(DataTable dt)
    {      
        StringBuilder JsonString = new StringBuilder();
       if (dt != null && dt.Rows.Count > 0)
        {
         
            JsonString.Append("[ ");
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                JsonString.Append("{ ");
                for (int j = 0; j < dt.Columns.Count; j++)
                {
                    if (j ==0)
                    {
                        JsonString.Append("\"" + dt.Columns[j].ColumnName.ToString() + "\":" + "\"" + dt


Ïà¹ØÎĵµ£º

×î¼òµ¥µÄAjaxÀý×Ó

<input type="button" onclick="ajaxTest()" value="AJAX²âÊÔ">
<input type="button" onclick=" document.getElementById('weather').innerHTML='' " value="Òþ²Ø">
<mce:script type="text/javascript"><!--
// 1. ³õʼ»¯ ÇëÇó ¶ÔÏó
// Mozilla/Firefox 쵀
//var xmlhttp = ne ......

AjaxʵÏÖµÄÃ÷ϸȥ³ýÖØ¸´ datatableÈ¥³ýÖØ¸´

ajax  Detail.aspxÒ³Ãæ
 protected void Page_Load(object sender, EventArgs e)
    {
        Thread.Sleep(500);
        string Keyid = Request.QueryString["Id"].ToString();
      ......

Ajax ºÍ XML: ÎåÖÖ³£¼û Ajax ģʽ

ºÃ¾Ã²»ÅöWEBµÄ¶«¶«ÁË,×î½üѧϰ£Ó£Á£ÐµÄ£Â£Ó£Ð¼¼Êõ£¬ÓÖÓõ½ÕâЩ£¬Ë³±ãתƪÎÄÕ£¬±¸²é£®
Ô­ÎĵØÖ·: http://www.ibm.com/developerworks/cn/xml/x-ajaxxml2/
Ajax ºÍ XML:
Îå
ÖÖ³£¼û Ajax ģʽ
¿ÉÁ¢¼´Ê¹ÓÃÕâЩ·Ç³£ÓÐÓÃµÄ Ajax Éè¼ÆÄ£Ê½
ÎĵµÑ¡Ïî
<tr valign="top"><td width="8">< ......

jQuery Ajax »Ø¹Ë

     ÔÚ±¾½ÚÎÒ×¼±¸Ö»Ð´ÉϹØÓÚAjaxµÄ˵Ã÷£¬¶àÊýÀ´×ÔjQueryµÄ°ïÖúÎĵµ£¬ËùÒÔ²»Òª·ÅÔÚÊ×Ò³¡£ÒòΪÎÒ¾õµÃÊ×Ò³Ó¦¸ÃÊÇÒª»¨·ÑÁËʱ¼äºÍÐÄ˼µÄ×÷Æ·¡£´úÂëÑÝʾºÍjQuery Ajax һЩÐµģ¬½«ÔÚÏÂÒ»´ÎÓпÕʱ½²Êö£¬ÕâÀï¾Í²»½²ÁË¡£Ê±¼äÒѾ­0³¿ÁË¡£Èç¹ûÄã¾ÙµÃÓÐʲôjQueryµÄÒÉÎÊ»òÕß¾õµÃAjax¸Ã½²ÊöÄÇЩÄÚÈݵͼ¿ÉÒÔ¸úÎÒÁô ......

asp.netÔÚÓÃajaxµÄʱºòÈçºÎµ¯³ö¶Ô»°¿ò


<form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>
    <asp:updatepanel ID="UP" runat="server">
      <ContentTemplate>
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ