Query AjaxµÄʹÓÃ
³¡¾°£ºÔÚGridviewÁбíÖÐÏÔʾÓдÓÊý¾Ý¿âÌáÈ¡³öÀ´µÄÊý¾Ý£¬ÏÖÔÚҪͨ¹ýjQuery.Ui.Dialogµ¯³öÏÔʾÿÌõÊý¾ÝµÄÏêϸÐÅÏ¢£¬²¢ÔÚµ¯³ö´°¿ÚÖÐÐ޸ı༡£
ÐèÒª´¦ÀíµÄÎÊÌ⣺1¡¢½«GridviewÖÐÑ¡Ôñ¼Ç¼IDÌá½»¸øjQuery.Ui.Dialog
2¡¢±£´æ´¦Àí
Éè¼Æ˼·£º
ΪÊý¾Ý°ó¶¨¡¢Êý¾Ý¸üÐÂÉè¼ÆÒ»¸öaspxÒ³ÃæרÃÅ¡£Í¨¹ýµ÷ÓÃjQuery ajaxµÄload·½·¨£¬ÔØÈëÊý¾Ý°ó¶¨Ò³Ãæ½ø¶øÏÔʾ°ó¶¨µÄÊý¾Ý¡£
Ò³Ãæ´úÂë
<div id="loading" class="loading">
·þÎñÆ÷´¦ÀíÖУ¬ÇëÉÔºó¡£
</div>
<div id="divBindShowData">
</div>
<data:EntityGridView ID="GridView1" DataSourceID="TbCorpCreditsInfoDataSource" DataKeyNames="PrimaryKey" >
<Columns>
<asp:TemplateField HeaderText="²é¿´/±à¼">
<ItemTemplate>
<asp:HyperLink ID="hlCreditScoreEdit" runat="server" ImageUrl='Images/View.gif' PrimaryKey='<%# DataBinder.Eval(Container.DataItem, "PrimaryKey") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="CorpName" HeaderText="ÆóÒµÃû³Æ" SortExpression="[CorpName]" />
Ïà¹ØÎĵµ£º
1. Accordion
¡¾¹¦ÄܸÅÊö¡¿Accordion¿ÉÒÔÈÃÄãÉè¼Æ¶à¸öpanel ²¢ÇÒÒ»´ÎÖ»ÏÔʾһ¸öPanel .ÔÚÒ³ÃæÉϵÄÏÔʾЧ¹û¾ÍÏñÊÇʹÓÃÁ˶à¸öCollapsiblePanelsÖ»²»¹ýÿһ´ÎÖ»Õ¹¿ªÆäÖÐÒ»¸ö CollapsiblePanel.Accordion¿Ø¼þÄÚ²¿°üº¬ÁËÈô¸É¸öAccordionPane£¬Ã¿Ò»¸öAccordionPaneµÄ templateÀï°üÀ¨Á˶ÔÆäHeaderºÍContentµÄ¶¨Òå¡£ÎÒÃÇ¿ÉÒÔÔÚºǫ́ ......
Ç°ºó¶ËµÄ½»»¥ÊÇÕû¸ö¿ò¼ÜµÄÖÐÐÄ£¬ÎÒÏ£Íû´ÓÁ÷µÄ½Ç¶ÈÀ´Éè¼ÆAJAXµÄ½»»¥
AJAXµÄÉè¼Æ½«ºá¹áÇ°ºó¶Ë
Ç°¶ËÊÇÖ÷¶¯
ºó¶ËÊDZ»¶¯
ÕûÌ忼ÂǵĻ° Ç°ºó¶ËʹÓÃÒ»¸öͳһµÄ½Ó¿Ú½øÐÐAJAX½»»¥
ºó¶Ë ÓÃÒ»¸öΨһµÄURLÀ´´¦Àí AJAXÇëÇó
½Ó¿ÚÃû³Æ ´¦Àí½Ó¿Ú£º[http://ÓòÃû/mvc.ajax] ·â×°ËùÓеÄAJAXÇëÇóµÄÔ¤´¦Àí
......
1.Ç°¡¢¶Ëºó¶¼Òª×öºÃ°²È«µÄ°Ñ¹Ø¹¤×÷
ÓÉÓÚAjaxÒ²»á½ÓÊÕºó¶Ë´«ËÍÀ´µÄ×ÊÁÏ£¬¶ÔÕâЩ×ÊÁ϶¼Òª²É²»ÐÅÈÎ̬¶È£¬±ØÐë¼ÓÒÔ¼ì²é¡£
2.¾¡Á¿ÒÔHTTP POST·½·¨´«Êä×ÊÁÏ
ËäÈ»POST²¢·ÇÍòÎÞһʧ£¬µ«±ÈÆðGETÖÁÉÙ½ÏΪ°²È«¡£
3.²»ÒªÖ±½ÓÓÃevalº¯Ê½»½ÆðJSONÎï¼þ
JSONÊDzÉÓÃJavaScriptÎï¼þʵ×ÖµÄ×ÊÁϸñʽ£¬´Óºó¶Ë´«µ½Ajax³Ìʽʱ£¬±ØÐë²ÉÓÃevalº ......
Background For the basic of how to create an AJAX enabled WCF service, please refer to MSDN: http://msdn.microsoft.com/en-us/library/bb924552.aspx. For the basic of JSONP, please refer to: http://en.wikipedia.org/wiki/JSON#JSONP. This article introduce how to make AJAX enabled WCF service support cr ......
ʼþ´¥·¢£º
<input name="keyword" onkeyup="LoadResults(this.value)" id="keyword" runat="server"/>
¿Í»§¶ËÖ÷Ì壺
//¶¨ÒåÓû§¿Ø¼þIDÈ«¾Ö±äÁ¿
var ClientID;
function ShowDiv(divid)
{
//...
}
function HideDiv(divid)
{
//...
}
//Ò³Ãæ¼ÓÔØʱµÄ´¦Àí
function BodyLoad()
{
HideD ......