µÚ¶þ²½£º·ºÐÍͨÓö¯Ì¬²éѯ(LinQ+Ajax)
ÎҵĴºÇï³ÕÃεڶþ²½£º
дһ¸ö ͨÓÃµÄ ¶ÔÏó ÁÐ±í £¬»¹ °üº¬ ËÑË÷ºÍ ÊôÐÔ¹ýÂË¡£
¾ßÌåµÄЧ¹ûÊÇ£º
µ±Ð ҵÎñ Ìí¼ÓÒ»¸ö ±íµÄʱºò£¬Ö»ÐèÒªÔÚ ¶ÔÏóÄ£ÐÍÀïµÄ Ìí¼ÓÒ»¸ö model
ºǫ́¼¸ºõ²»Ðèд´úÂë¡£
(ÎÒÊǺǫ́£º¼¤¶¯ÈËÐÄ£¡)
µ÷ÓõĶÔÏ󣬵ڼ¸Ò³£¬ÊôÐ﵀ ¹ýÂË ºÍËÑË÷È«ÊÇ Ç°Ì¨µÄAjax²ÎÊý¿ØÖÆ
(ÎÒÊÇǰ̨£º#$!@#$%$^#$%# )
ÏÂÃæ˵˵ÎÒµÄ˼·°É£º
1.ǰ̨·¢³öÇëÇó дÃ÷ µ÷ÓÃµÄ modleName ºÍ һЩÊôÐÔ µÄ¹ýÂË
È磺Author like,1
ModelName
Article ËÑË÷×÷Õß °üº¬ 1 ¶ÔÏóÃû ÎÄÕÂ
2.ºǫ́½ÓÊÜ ´¦Àí´«µÝµÄ²ÎÊý
3.¸ù¾Ý ¶ÔÏóÃû µ÷Óà ¶ÔÏó ²¢¹ýÂË
4.¸ù¾Ý ¶ÔÏóÃû ·µ»Ø ¶ÔÓ¦ Ò³Ãæ
1.ǰ̨JS ´úÂë
ǰ̨´úÂë
//================================================
//ºǫ́ÈÎÒ» ÀàÐÍ Áбí
//================================================
function AjaxForList(duixiang, pageid) {
var searchWords = $("#SearchWords").val();
var searchType = $("#SearchType").val();
var channelId = $("#list").val();
var IsRecycle = $("#IsRecycle").attr("checked");
//ÅÅÐòÃû
var sortName = "CreaterData";
//==================IsRecycle
var Del = new Array();
Del.push("="); //alert(IsRecycle);
if (IsRecycle) { Del.push(1); }
else { Del.push(0); }
//==================FullTitle
// 2010-3-22 0:00:00
var FullTitle = new Array();
FullTitle.push("like");
FullTitle.push("1");
//==================FullTitle
var Author = new Array();
Author.push("like");
Author.push("1");
//==================IsAudit
var IsAudit = new Array();
IsAudit.push("=");
IsAudit.push("0");
//============================
$.ajax(//
{
type: "POST",
url: "/Admin/UserKJ/AjaxForList",
data: "ModelName=" + duixiang + "&&PageId=" + pageid + "&&sortName=" + sortName + "&&Del=" + Del + "&&FullTitle=" + FullTitle + "&&Author=" + Author + "&&IsAudit=" + IsAudit,
dataType: "html",
beforeSend: function(XMLHttpRequest) { //
Ïà¹ØÎĵµ£º
×î½üÒ»Ö±ÔÚÑ°ÕÒÒ»¸ö±È½Ï·½±ãºÃÓõÄÊ÷¿Ø¼þ£¬MyTreeÊ÷¿Ø¼þ²¢Ã»ÓÐÌṩºÜ¶àÆäËûµÄ¹¦ÄÜ£¬µ«ÔÚAjaxÒì²½¼ÓÔؽڵãÉÏʵÏֵĺܼò½à£¬Áô×÷±¸Íü¡£
MyTreeµÄÏÂÔصØÖ·£ºhttp://www.itplus.com.cn/myTree/
ÏÂÔغó Demo£ºAjaxÒì²½¼ÓÔØÀý×Ó
Document£ºÎĵµ
......
±¾ÈË×î½ü¼òµ¥Ð´ÁËÒ»¸ö¶¯Ì¬È¡Êý¾ÝµÄµÄÒ»¸öAjax·½·¨£¬Ê¹ÓÃJquery×÷Ϊ¿ò¼Ü£¬Ë¼Â·ÈçÏ£ºÊ×ÏÈÀûÓúǫ́°ÑÊý¾Ý´æÈëÒ»¸ö¼òµ¥µÄ¼Çʱ¾ÎļþÖУ¬È»ºóAjax·ÃÎÊÒ»¸öWeb Ò³Ã棬WebÒ³Ãæ»ñÈ¡¼Çʱ¾ÎļþÄÚÈÝ£¬²¢·µ»ØÄÚÈݸøAjax£¬AjaxÊ×Ò³ÏÔʾÊý¾Ý¡£µ«ÊÇÓöµ½ÎÊÌâÁË£¬ÎÊÌâ¾ÍÊÇÖÐÎĵıàÂëÎÊÌâ¡£µ±ºǫ́ȡÊý¾Ý¸øAjax£¬AjaxÏÔʾÊý¾ÝµÄʱºò£¬Ô ......
ASP.NET AJAXÈëÃÅϵÁн«»áд¹ØÓÚASP.NET AJAXһЩ¿Ø¼þµÄʹÓ÷½·¨ÒÔ¼°»ù´¡ÖªÊ¶£¬ÆäÖв¿·ÖÎÄÕÂΪԴ´£¬Ò²ÓÐһЩÎÄÕÂÊÇÖ±½Ó·Òë×Ô¹Ù·½Îĵµ£¬±¾²¿·ÖÄÚÈݻ᲻¶Ï¸üС£
Ŀ¼
ASP.NET AJAXÈëÃÅϵÁУ¨1£©£º¸ÅÊö
µ¼¶Á£º×÷Ϊ±¾ÏµÁÐÎÄÕµĿªÆª£¬¼òµ¥½éÉÜÒ»ÏÂASP.NET AJAXµÄ¸Å¿ö¼°¸÷¸ö×é³É²¿·Ö¡£
......
Ò».AjaxProµÄʹÓÃ
1.ÔÚÏîÄ¿ÖÐÌí¼ÓÒýÓã¬ä¯ÀÀÕÒµ½AjaxPro.2.dllÎļþ
2.ÔÚWeb.configÖеÄsystem.webÀïÃæдÈëÒÔÏ´úÂë
</configuration>
<system.web>
<httpHandlers>
<add verb="*" path="*.ashx" type="AjaxPro.AjaxHandlerFactory,AjaxPro.2"/>
</httpHandlers>
</system.web> ......
²ÎÊýÃû
ÀàÐÍ
ÃèÊö
url
String
(ĬÈÏ: µ±Ç°Ò³µØÖ·) ·¢ËÍÇëÇóµÄµØÖ·¡£
type
String
(ĬÈÏ: "GET") ÇëÇó·½Ê½ ("POST" »ò "GET")£¬ ĬÈÏΪ "GET"¡£×¢Ò⣺ÆäËü HTTP ÇëÇó·½·¨£¬Èç PUT ºÍ Delete Ò²¿ÉÒÔʹÓ㬵«½ö²¿·Öä¯ÀÀÆ÷Ö§³Ö¡£
timeout
N ......