¹ØÓÚ½â¾öASP.NETÖÐAJAXÂÒÂëÎÊÌâ
Js´úÂë
var url=Service.aspx?Value=' + escape(va);
obj=CreateAJAX();
if(obj)
{
obj.open('get',url,true);
obj.send(null);
}
var url=Service.aspx?Value=' + escape(va);
obj=CreateAJAX();
if(obj)
{
obj.open('get',url,true);
obj.send(null);
}
ASP.NETµÄESCAPEº¯Êý£º
C#´úÂë
private string escape(string s)
{
StringBuilder sb = new StringBuilder();
byte[] ba = System.Text.Encoding.Unicode.GetBytes(s);
for (int i = 0; i < ba.Length; i += 2)
{ /**///// BE SURE 2's
sb.Append("%u");
sb.Append(ba[i + 1].ToString("X2"));
sb.Append(ba[i].ToString("X2"));
}
return sb.ToString();
}
private string escape(string s)
{
StringBuilder sb = new StringBuilder();
byte[] ba = System.Text.
Ïà¹ØÎĵµ£º
var file = filefromPath(encodeURI(encodeURI(this._input.value)));//»ÆÓðÐÞ¸Ä 2010Äê4ÔÂ8ÈÕ //Ð޸ĺó
²»ºÃÒâ˼ÄÇÌìûÓÐÔÚIE²âÊÔ
  ......
±¾ÀýÊDzÉÓÃJSP + Ajax + Îı¾À´ÑÝʾ¶àÑ¡¡¢È«Ñ¡£¬Ìí¼Ó¡¢É¾³ý¡¢¸üÐÂcheckbox¶àÑ¡¿òµÄЧ¹û£»³ä·ÖÕ¹ÏÖÁËÀûÓÃJavaScript¿ØÖÆHTML DOMÒÔ¼°ÀûÓÃXML http ´«µÝÊý¾Ý£¬ÀûÓÃJSP²Ù×÷Îı¾µÄЧ¹û¡£
¡¡¡¡1.JavaScript ÓÃÀ´¿ØÖÆÒ³ÃæÄÚÈݵÄÏÖʵÓëÔöɾЧ¹û£»
¡¡¡¡2.JSP×÷Ϊºǫ́£¬¶ÔÎı¾½øÐжÁÈ¡¡¢Ð´Èë¡¢¸üеȲÙ×÷£»
¡¡¡¡3.Îı¾¸ñʽÊÇÓÃÀ´´ ......
Óö¼û¹ýÕâÑùµÄÎÊÌ⣬ºÜÆæ¹Ö£¬¾ÍÊÇ asp.net button°´Å¥onclickʼþ´¥·¢²»ÁË£¬
µã»÷û·´Ó¦£¬È»ºóÔÚÍøÉϲéÁËЩ×ÊÁÏ£¬·¢ÏÖÒ»¸ö˵·¨£¬“Ò»°ãÀ´ËµÊÇ¿Í»§¶ËÔ´´úÂëÖÐÓжà¸öform±êʶ£¬»á³öÏÖÕâÖÖÇé¿ö”
ÓÚÊǾͲ鿴×Ô¼ºµÄÒ³Ãæ´úÂ룬ÕæµÄÓÐÁ½¸öform£¬È¥µôÒ»¸öºó£¬¾ÍÕý³£À²£¬
ÖÁÓÚ ÕâÖÖÇé¿ö£¬Ôڴ˼ÇÏÂÀ´£¬×÷¸öѧϰµÄÒ»¸öÐ¡Ö ......
<a>±êÇ©
1. <a href=”test.aspx”></a>
2. ÕâÊÇ×î³£¼ûµÄÒ»ÖÖתÏò·½·¨;
HyperLink¿Ø¼þ
1. Asp.net ·þÎñÆ÷¶Ë¿Ø¼þ ÊôÐÔNaviga ......
ÎÊÌâ1£º
“/dsfsd”Ó¦ÓóÌÐòÖеķþÎñÆ÷´íÎó¡£
佫¶ÔÏóÒýÓÃÉèÖõ½¶ÔÏóµÄʵÀý¡£
˵Ã÷: Ö´Ðе±Ç° Web ÇëÇóÆڼ䣬³öÏÖδ´¦ÀíµÄÒì³£¡£Çë¼ì²é¶ÑÕ»¸ú×ÙÐÅÏ¢£¬ÒÔÁ˽âÓйظôíÎóÒÔ¼°´úÂëÖе¼Ö´íÎóµÄ³ö´¦µÄÏêϸÐÅÏ¢¡£
Òì³£ÏêϸÐÅÏ¢: System.NullReferenceException: 佫¶ÔÏóÒýÓÃÉèÖõ½¶ÔÏóµÄʵÀý¡£
Ô´´íÎó:
Ö´ ......