asp.net + jquery+json µÄ¼òµ¥ÊµÀý
ÕâÀïÊÇÎÒµÄÒ»¸ö¼òµ¥µÄjquery+jsonµÄÁ¬¿â²Ù×÷£¬Ö»ÊÇÒ»¸ö¼òµ¥²éѯ£¬
//ºǫ́´úÂë
<%@ WebHandler Language="C#" Class="show" %>
using System;
using System.Web;
using System.Collections.Generic;
using Model;
using DAL;
using System.Web.Script.Serialization;
public class show : IHttpHandler {
public void ProcessRequest (HttpContext context) {
JavaScriptSerializer serializer=new JavaScriptSerializer();
//µ÷Óúǫ́·½·¨
IList<test> tt = testservice.getalltest();
//ÐòÁл¯
string date= serializer.Serialize(tt);
context.Response.ContentType = "text/plain";
context.Response.Write(date);
}
public bool IsReusable {
get {
return false;
}
}
}
//ǰ̨´úÂë
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="js/jquery-1.3.2.js" type="text/javascript"></script>
<script src="js/jquery.js" type="text/javascript"></script>
<script type="text/javascript" language="javascript">
$(document).ready(function() {
&n
Ïà¹ØÎĵµ£º
asp.net ½«Excelµ¼Èëµ½Sql2005»ò2000µÄ˼·ºÍ²½Ö裺
1¡¢½«ExcelÎļþÉÏ´«µ½·þÎñÆ÷¶Ë
Õâ¸öÎÒ²»ÏëÏêϸ½²ÁË,ÍøÉÏÒ»ËÑÒ»´ó°ÑµÄ.
×¢Ò⣺£¨1ÔÚÈ¡·þÎñÆ÷·¾¶Ê±Ò»¶¨ÒªÓÃthis.Page.MapPath(".")¶ø²»ÒªÓà this.Page.Request.Applic ......
×î½üÐèÒªÒ»¸öasp.netϵÄÍøÒ³±à¼Æ÷£¬¾¹ý¼¸ÌìµÄ²éÕÒÓëÕûÀí£¬ÖÕÓÚ½«Ö÷ÒªµÄ¼¸¸ö±à¼Æ÷ÕÒÆ룬×Ô¼ºÓùýºó£¬×ÜÖÕһϡ£
1¡¢ Cuteeditordemo£º¹¦ÄÜ×îÇ¿´óµÄÓ¦¸ÃÊÇÕâ¸ö±à¼Æ÷ÁË£¬µ«ÊÇÕâ¸ö±à¼Æ÷±È½ÏµÄ´ó£¬ÓÐ5MB¶à£¬Í¬Ê±ÔËÐÐÆðÀ´Ëٶȷ½ÃæÒ²±È½ÏµÄÂý¡£ÔÚʵ¼ÊµÄʹÓÃÖУ¬¹úÄÚʹÓõÄÈ˲¢²»¶à£¬¶øÇÒÊÇÓ¢ÎÄ°æµÄ¡£Ç¿ÄÜÊÇ×îÇ¿´ó£¬µ ......
private void WriteXML()
{
StringBuilder sb = new StringBuilder();
sb.Append("<?xml version=\"1.0\" encoding=\"UTF-8\" ?> ");
sb.Append(" <!-- ");
sb.Append("<content>");
sb.Append(& ......
²âÊÔµÄurlµØÖ·ÊÇhttp://www.test.com/testweb/default.aspx, ½á¹ûÈçÏ£º
Request.ApplicationPath: /testweb
Request.CurrentExecutionFilePath: /testweb/default.aspx
Request.FilePath: /testweb/defa ......