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
Ïà¹ØÎĵµ£º
<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 Detail.aspxÒ³Ãæ
protected void Page_Load(object sender, EventArgs e)
{
Thread.Sleep(500);
string Keyid = Request.QueryString["Id"].ToString();
......
ºÃ¾Ã²»ÅöWEBµÄ¶«¶«ÁË,×î½üѧϰ£Ó£Á£ÐµÄ£Â£Ó£Ð¼¼Êõ£¬ÓÖÓõ½ÕâЩ£¬Ë³±ãתƪÎÄÕ£¬±¸²é£®
ÔÎĵØÖ·: http://www.ibm.com/developerworks/cn/xml/x-ajaxxml2/
Ajax ºÍ XML:
Îå
ÖÖ³£¼û Ajax ģʽ
¿ÉÁ¢¼´Ê¹ÓÃÕâЩ·Ç³£ÓÐÓÃµÄ Ajax Éè¼ÆÄ£Ê½
ÎĵµÑ¡Ïî
<tr valign="top"><td width="8">< ......
ÔÚ±¾½ÚÎÒ×¼±¸Ö»Ð´ÉϹØÓÚAjaxµÄ˵Ã÷£¬¶àÊýÀ´×ÔjQueryµÄ°ïÖúÎĵµ£¬ËùÒÔ²»Òª·ÅÔÚÊ×Ò³¡£ÒòΪÎÒ¾õµÃÊ×Ò³Ó¦¸ÃÊÇÒª»¨·ÑÁËʱ¼äºÍÐÄ˼µÄ×÷Æ·¡£´úÂëÑÝʾºÍjQuery Ajax һЩÐµģ¬½«ÔÚÏÂÒ»´ÎÓпÕʱ½²Êö£¬ÕâÀï¾Í²»½²ÁË¡£Ê±¼äÒѾ0³¿ÁË¡£Èç¹ûÄã¾ÙµÃÓÐʲôjQueryµÄÒÉÎÊ»òÕß¾õµÃAjax¸Ã½²ÊöÄÇЩÄÚÈݵͼ¿ÉÒÔ¸úÎÒÁô ......
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div>
<asp:updatepanel ID="UP" runat="server">
<ContentTemplate>
......