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

AJAXÑéÖ¤Êý¾Ý²»Í¨¹ý,ÈçºÎÈÃÌá½»µÄ´úÂëÍ£Ö¹?

¸÷λ:

ÎÒÏëʵÏÖ:Óû§ÔÚµã»÷Ò³ÃæµÄÌá½»°´Å¥(server¶Ë°´Å¥),ÏÈͨ¹ýÒ³ÃæAJAX¼ì²éÒ³ÃæÊý¾Ý,ÔÙ¸ù¾ÝÑéÖ¤µÄ½á¹û¾ö¶¨ÊÇ·ñÌá½»Êý¾Ý(Ìá½»Êý¾ÝµÄ´úÂëÊÇͨ¹ýSERVER¶Ë´úÂëÌá½»µÄ.

ÎÒÓÃÒÔÏ·½·¨,·¢ÏÖϵͳʵÏÖ²»ÁË:

1.ÉèÖð´Å¥´¥·¢Ò»¸ö¿Í»§¶Ëµã»÷ʼþºÍÒ»¸ö·þÎñÆ÷µã»÷ʼþ(¿Í»§¶ËÆôÓÃAJAXÑéÖ¤,·þÎñÆ÷ÓÃ×÷Ìá½»Êý¾Ý),´úÂëÈçÏÂ:HTML code:
<asp:LinkButton ID="btSave" runat="server" Height="15px" Text="±£´æÐÅÏ¢" Visible="False" OnClick="btSave_Click" OnClientClick="return CheckFieldDataOnClient()" />

2.ÔÚ¿Í»§¶Ë´úÂëÖÐÆôÓÃAJAXµ÷ÓÃ,´úÂë¼ò»¯ÈçÏÂ:JScript code:
var xmlHttp;
var bCheckResult; //ÓÃ×÷ÅжÏAJAXÑéÖ¤½á¹ûµÄ²ÎÊý

function CheckFieldDataOnClient()
{
//´´½¨¼°´ò¿ªXMLHTTP,¼°·¢ËÍÇëÇó,¾ßÌå´úÂëÂÔ(Åųý´úÂë´íÎóµÄ¿ÉÄÜ)
//ÉèÖÃÑéÖ¤·µ»Øº¯Êý:OnReadyFunction
return bCheckResult ;
}

function OnReadyFunction()//½ÓÊÕXMLHTTPÑéÖ¤·µ»ØÊý¾ÝµÄº¯Êý
{
//½ÓÊÕÑéÖ¤Êý¾Ý,Èç¹ûÑé֤ͨ¹ý:
bCheckResult = true;
//Èç¹ûÑéÖ¤²»Í¨¹ý;
bCheckResult = false;
}


·þÎñÆ÷Ìá½»³ÌÐò:C# code:
protected int SaveData()
{
//Ìá½»Êý¾Ý.´úÂëÂÔ.


Ïà¹ØÎÊ´ð£º

DW ÅäÖÃAjax »·¾³ÎÊÌâ..

ÏëÖªµÀÔõôÔÚDWÖÐÔËÐÐAjax


ÎÒÔËÐеÄÎļþ±¨Õâ¸ö´í..
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0

Fatal error: Unknown: Failed opening requir ......

ΪʲôҳÃæÒ»¼ÓÉÏAjax¾Í³ö´í

²é¿´Ô´Îļþʱ³öÀ´µÄ
<script type="text/javascript">
// <![CDATA[
Sys.Application.initialize();
Sys.Application.add_init(function() {
    $create(Sys.UI._Upd ......

»ùÓÚAjaxµÄ¸öÈ˲©¿ÍÍøÕ¾ÕýʽÉÏÏߣ¬É¢·Ö

¾­¹ýÒ»¸öÐÇÆڵIJ»¶ÏŬÁ¦£¬ÎҵĻùÓÚAjaxµÄ¸öÈ˲©¿ÍÖÕÓÚ¿ÉÒÔÕýʽÉÏÏßÁË¡£
ÏÖÔÚÉ¢·Ö½ÓÊܸ÷λ´óÏÀµÄ±ÉÊÓ¡£
ÍøÖ· www.bleehome.cn  BLEE HOME

(±¾À´Ïë¶àÉ¢µã£¬µ«ËµÎÒÖ»ÄÜÉ¢100.Õâ¸öµ½Ê±ÔÙÏëÏë°ì·¨)
~j ......

AjaxÓëSessionµÄÎÊÌâ - .NET¼¼Êõ / ASP.NET

֮ǰÓöµ½Ò»¸öÎÊÌâ¡£
ÓÚÊÇ×öÁËÒÔÏÂʵÑ飺
Ò³Ãæ¼ÓÔغó£¬Ìá½»Ò»¸öAjaxÇëÇó(ÔݳÆΪajax1)£¬ÇëÇóµÄÏß³ÌÔÚ·þÎñÆ÷Éϱ»Ë¯Ãß10ÃëÖÓ¡£
µã»÷Ò³ÃæÉÏÒ»¸öbutton£¬´¥·¢ÁíÒ»¸öAjaxÇëÇó(ajax2)¡£
µ±Ã»ÓÐʹÓÃsession£¬ÔÚ·þÎñÆ÷δ´ ......

AJAXÎÊÌ⣡£¡

Ò»¸öButton
Ò»¸öModalPopupExtender
Ò»¸öPanel

ÎÊÌâÊÇÕâÑùµÄ£ºÔÚ×öÐÞ¸Äʱºò µ±µãÐÞ¸ÄButton Panel ÏÔʾÁËÒ²ÓÐÒõӰЧ¹û£»
µ«ÊÇÎÒÐÞ¸ÄButtonÓÐbtn_Update_Clickʼþ£¬ÕâʼþÊÇ°ó¶¨Êý¾ÝµÄ£»
ÏÖÔÚµÄÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ