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

ASP.NET»ùÓÚJQUERYµÄAJAXµÄÑéÖ¤µÇ¼£¨JSON£©

Default.aspx
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Ö÷Ò³</title>
   <script src="js/jquery-1.2.6.js" type="text/javascript"></script>
<script src="js/thickbox.js" type="text/javascript"></script>
<link type="text/css"  href="css/thickbox.css" rel="Stylesheet" />
</head>
<body>
<form id="form1" runat="server">
    <div style="margin-left:auto; margin-right:auto;width:400px;">
    <a href="ajaxLogin.html?height=120&width=250&modal=false" class="thickbox" title="ÇëµÇ¼">
    ÎÒÒª½øÐÐJQUERYµÇ¼ÑéÖ¤</a>
    <br />
    Õ˺ţºadmin<br/>
    ÃÜÂ룺admin<br />
    </div>
   
</form>
</body>
</html>
login.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="login.aspx.cs" Inherits="login" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>µÇ¼ÑéÖ¤</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
  
    </div>
    </form>
</body>
</html>
login.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.We


Ïà¹ØÎĵµ£º

ajax ´¦ÀíÒ첽ˢÐÂÖгöÏÖµÄÒì³£

Default3.aspx Code:
<%@Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"& ......

Ajax¿ò¼Ü

var XmlHttp;
var PathUrl;
function createXmlHttp() {
    if (window.ActiveXObject) {
        return new ActiveXObject("Microsoft.XMLHTTP");
    }
    else if (window.XMLHttpRequest) {
      ......

ajax´«µÝÌØÊâ²ÎÊý

²ÉÓÃAjax´«µÝ²ÎÊý¼ÓºÅ(+)ºÍÓë·ûºÅ(&)ʱºò£¬·þÎñ¶Ë»ñÈ¡µ½µÄ²ÎÊý²¢²»ÈçÒ⣡
(1) "+"ºÅ£ºJavaScript½âÎöΪ×Ö·û´®Á¬½Ó·û£¬ËùÒÔ·þÎñÆ÷¶Ë½ÓÊÕÊý¾Ýʱ"+"»á¶ªÊ§¡£
(2)"&"£ºJavaScript½âÎöΪ±äÁ¿Á¬½Ó·û£¬ËùÒÔ·þÎñÆ÷¶Ë½ÓÊÕÊý¾Ýʱ&·ûºÅÒÔºóµÄÊý¾Ý¶¼»á¶ªÊ§¡£
½â¾ö°ì·¨£ºÔÚ´«µ½·þÎñ¶Ë֮ǰÏȽ«²ÎÊýÖеÄ"+"ºÍ"&"·ûºÅ¶¼± ......

ASP.NET²É¼¯ÏµÍ³ÍòÄÜÕýÔò±í´ïʽ

ÓÉÓÚ¾­³£ÒªÐ´Ò»Ð©²É¼¯µÄ³ÌÐò£¬ÏÂÃæµÄÈý¸öº¯ÊýÊDzɼ¯Öеĺܳ£Óõĺ¯Êý¡£¹ÃÇҽвɼ¯ÏµÍ³ÍòÄÜÕýÔò±í´ïʽ°É¡£
µÚÒ»¸ö£º//»ñÈ¡Ò³ÃæµÄhtmlÔ´Âë
 public  string GetHtmlSource(string Url, string charset)
        {
    & ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ