asp.net ajax, ASPxCallBackѧϰ
----------------------ModalPopupExtender
D:\sourceforge\asp.net\AjaxControlToolkit_net20\SampleWebSite\ModalPopup\ModalPopup.aspx
// linkbutton1Ôö¼ÓÀ©Õ¹ModalPopupExtenderÊôÐÔ:
<asp:LinkButton ID="LinkButton1" runat="server" Text="Click here to change the paragraph style" />
<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender" runat="server"
TargetControlID="LinkButton1"
PopupControlID="Panel1"
BackgroundCssClass="modalBackground"
OkControlID="OkButton"
OnOkScript="onOk()"
CancelControlID="CancelButton"
DropShadow="true"
PopupDragHandleControlID="Panel3" />
CancelControlID: È¡Ïû°´Å¥,CancelButton
OkControlID: È·¶¨°´Å¥,OkButton
OnOkScript:µ±µã»÷È·¶¨Ö´ÐеĽű¾,onOk()
PopupDragHandleControlID:Í϶¯µ¯³ö¿òµÄ¿Ø¼þID, Panel3
TargetControlID:µ÷ÓÃÄ¿±ê¿Ø¼þ£¬LinkButton1,µã»÷Õâ¸ö¼´µ¯³öpop
// ÕâÀïÃæÓÐÒ»¸öÒþ²ØµÄ°´Å¥×÷Ϊµ÷ÓÃtarget, ·þÎñÆ÷:this.programmaticModalPopup.Show();¼´ÏÔʾmodalpop
<asp:Button runat="server" ID="hiddenTargetControlForModalPopup" style="display:none"/>
<ajaxToolkit:ModalPopupExtender runat="server" ID="programmaticModalPopup"
BehaviorID="programmaticModalPopupBehavior"
Ïà¹ØÎĵµ£º
ÎÒÃÇÔÚʹÓÃhtml¿Ø¼þµÄʱºòÌáʾ»»ÐзÖΪÈýÖÖ·½Ê½£º
µÚÒ»ÖÖ:
Ö±½Ó»»ÐÐ
<input type="text" tilte="pan
da">
µÚ¶þÖÖ:
²åÈë»»ÐзûºÅ
<input type="text" tilte="pan da">
µÚÈýÖÖ:
<input type="text" tilte="pan da">
ÒÔÉÏÊÇhtmlµÄÌáʾ»»ÐУ¡
Èç¹ûÎÒÃÇÔÚÓõ½webControlµÄʱºò
¾Í ......
Ò»¡¢Ä¿Ç°ÔÚASP.NETÖÐÒ³Ãæ´«Öµ¹²ÓÐÕâô¼¸ÖÖ·½Ê½£º
1¡¢±íµ¥Ìá½»£¬
<form action= "target.aspx" method = "post" name = "form1">
<input name = "param1" value = "1111"/>
<input name = "param2" value = "2222"/>
</form>
....
&nbs ......
ÏÂÃæ½éÉÜʵÏÖ·½·¨£º
Ò»¡¢ÍÏÀÒ»¸öMenu¿Ø¼þ
Õâ¸ö¿Ø¼þÊǸºÔð¿Ø¼þ¸÷¸öÑ¡ÏµÄ£¬Ò²¾ÍÊÇ×îÖÕ³ÊÏÖÔÚÓû§ÃæÇ°µÄ½çÃæ£¬²¢ÇÒÎÒÃÇÖ¸¶¨Ã¿¸öÑ¡ÏµÄͼƬ¡£
´úÂ룺
<asp:Menu ID="Menu1" runat="server" onmenuitemclick="Menu1_MenuItemClick"
Orientati ......
µÚÒ»ÖÖÊÇÔÚapsxÒ³ÃæÉÏ·ÅÒ»¸öLable¿Ø¼þ
ÕâÖÖ·½Ê½¿ÉÒÔдJavascriptµÈ¿ØÖÆÒ³Ã棬ºÍ²¼¾ÖÒ³Ãæ
ÈçÏ£ºHTMLÒ³Ãæ´úÂ룺
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<TITLE>¶àýÌå²¥·ÅÒ³Ãæ</TITLE>
<meta content=" ......
ÔÚASP.NET 2.0ÖУ¬ÓÐʱºòÐèÒª¶ÔASP.NETÉú³ÉµÄHTML´úÂë½øÐд¦Àí£¬»òÕßÊDZ£´æ³É¾²Ì¬Îļþ¡£ASP.NET Ìá
¹©ÁËÖ±½Ó½«ÇëÇó±£´æ³ÉÎļþµÄ·½·¨£ºHttpRequest.SaveAs·½·¨¡£ÏÂÃæÕâ¸ö·½·¨¾ÍÊÇÔÚASP.NET 2.0Öеõ½
ASP.NETÉú³ÉµÄHTML´úÂ룬ͬʱ£¬Éú³ÉÒ»¸ö¾²Ì¬ÎļþµÄ·½·¨¡£
C#
<%@ Page Language="C#" AutoEventWireup="true" %&g ......