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

Asp.net Ajax javascript²»ÄÜдÔÚjsÎļþÖÐ

ÈçÌâ¡£
ͬÑùµÄ´úÂ룬ÎÒÔÚaspxÒ³ÃæÖоÍÊÇÄÜÖ´Ðеģ»
·ÅÔÚjsÎļþÖУ¬Í¨¹ýÒýÓÃʹÓþͲ»ÐÐÁË£¬ÎªÊ²Ã´£¿

ÎÒ²ÂÊÇScriptManagerµÄÔ­Òò£»
ÄÜÔÚjsÎļþÖÐÒýÈëScriptManagerô£¿
up

°Ñµ¼Èë´úÂëÒƵ½aspxÖ´ÐÐЧ¹û´úÂëºóÃæÊÔÊÔ

ÒýÓÃ
ÈçÌâ¡£
ͬÑùµÄ´úÂ룬ÎÒÔÚaspxÒ³ÃæÖоÍÊÇÄÜÖ´Ðеģ»
·ÅÔÚjsÎļþÖУ¬Í¨¹ýÒýÓÃʹÓþͲ»ÐÐÁË£¬ÎªÊ²Ã´£¿

ÎÒ²ÂÊÇScriptManagerµÄÔ­Òò£»
ÄÜÔÚjsÎļþÖÐÒýÈëScriptManagerô£¿


ʵÔÚ²»¶®ÄãÎÊʲô£¿

·ÅÔÚaspxÒ³ÃæÖеĶ«Î÷¾ÍÓ¦¸Ã·ÅÔÚjsÎļþÖпÉÒÔÔËÐУ¿²»¶®¡£

ÔÚjsÎļþÖÐÒýÈëScriptManager£¿¸ü²»¶®Ôõô»áÕâô±È΢Èí»¹³¬Ç°Ðí¶àÄꣿ

·Ï»°¶àЩ°É£¬ Ôݲ»¿¼ÂÇajax.

1¡¢Äã²»ÄÜÔÚ.jsÀïÓÃdocument.getElementById(' <%= TextBox1.ClientID %>');ÕâÑùµÄ¶«Î÷¡£

JScript code:

//Scripts/JScript.js
function showMessage(s) {
alert(s); //¼òµ¥½ÓÊÕÒ»×Ö·û´®£¬ ÓÃalert()ÏÔʾ¡£
}


C# code:

// Default.aspx.cs
protected void Page_Load(object sender, EventArgs e)
{ // Æäʵû±ØÒª¶¯Ì¬×¢²á£¬ÕâÀïÖ»ÊǹÊÒâÓÃһ϶¯Ì¬×¢²á¡£
if (!Page.ClientScript.IsClientScriptIncludeRegistered(this.GetType(), "myMessage"))
{
Page.ClientScript.Register


Ïà¹ØÎÊ´ð£º

aspÉý¼¶µ½asp.net£¬ºÃ¶à½á¹¹¶¼²»ÖªµÀÈçºÎת»»

aspÏÂÃ棬µ±Òª¸ù¾Ý²»Í¬µÄȨÏÞÏÔʾһЩ¹¦ÄÜ°´Å¥µÄ»°»áд³É
<%
if ȨÏÞ=1 then
%>
<input type="submit" name="Submit" value="Ìá½»" />
<%
end i ......

asp.netÔÚ·þÎñÆ÷ÎÞ·¨²¥·ÅflvÊÓƵ

±¾ÈËʹÓÃswfobject.jsÔÚ±¾»ú¿ÉÒÔÕý³£²¥·Å£¬µ«·¢²¼µ½win2003·þÎñÆ÷¾ÍÎÞ·¨²¥·Å£¬ÍøÉÏÕÒÁËÐí¶à¶¼ËµÐèÒªÅäÖÃMIMEÀàÐÍ£¬ÎÒÅäÖÃÁËҲûÓгɹ¦£¬Çë¸ßÊÖÖ¸µãÒ»ÏÂ
·þÎñÆ÷ÊÇ·ñÖ§³Ö£¬Â·¾¶ÊÇ·ñÕýÈ·


ÓеķþÎñÆ÷¿ÉÄܲ»Ö§³Ö ......

asp.net repeater ¿Ø¼þÔõô¿ÉÒÔÈ¡µ½×ӿؼþµÄÖµ

asp.net repeater ¿Ø¼þÔõô¿ÉÒÔÈ¡µ½×ӿؼþµÄÖµ£¬ÉèÖöϵãÔÚ ItemDataBound ʼþÔõôûÓÐÓõÄ
Request.Form["name"]

Â¥Ö÷ÄãÒªÔÚ°ÑrepeaterÖÐµÄ Ò»¸öÊôÐÔÉèÖÃһϲÅÄܽøÈëitemdataboundʼþ

¿ÉÒÔ ......

ÈçºÎÉú³ÉASCII¸ñʽÎļþ asp.net

rt  ÎÒÉú³ÉµÄÎļþµÄ±£´æ¶¼ÊÇutf-8 ÈçºÎÄÜÊÖ¶¯¿ØÖƳÉASCII


System.IO.File.WriteAllText(@"c:\a.txt", "hello", Encoding.ASCII);

ÄÇÊ×ÏÈ¿´Äã¶Á½øÀ´µÄÎļþÊǸöʲô±àÂë¸ñʽ,Èç¹ ......

É¢·Û ÕýÔÚѧϰasp.net mvc ºÜÍ·´ó

ÕýÔÚѧϰÕâ¸ö¶«¶« ¸Ð¾õºÜ¶àµØ·½²»ÊǺܶ® ÕýÔÚŬÁ¦ É¢µã·Û¸øasp.netµÄͬÈÊÃÇ Çó½ÌºÃµÄѧϰ×ÊÁÏ Ð»Ð»
²Î¿¼

asp.net/mvcÉÏÓкܶàÄÚÈÝ¡£ 
×î½üÒ²ÔÚ¿´¡£ 
ͬÁÄ¡£

JF,3Q


±ÈÎÒÓÐǰ;, ÎÒÖÁÉÙÄ¿Ç° ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ