asp.net »ñÈ¡html¿Ø¼þµÄÖµµÄ´úÂë
asp.net »ñÈ¡html¿Ø¼þµÄÖµµÄ´úÂëÈçÏ£º
WebForm1.aspx£º
< INPUT ID="TXT" TYPE="TEXT" RUNAT="SERVER" VALUE="AAAAAA">
< INPUT TYPE="BUTTON" RUNAT="SERVER" VALUE="BTNTEST" ID="BUTTON1" NAME="BUTTON1">
WebForm1.aspx.cs£º
private void Button1_ServerClick(object sender, System.EventArgs e)
{
// ·½·¨1£ºÍ¨¹ýControl²éÕÒ
Control ctrl = FindControl("txt");
HtmlInputText txtCtrl= (HtmlInputText)ctrl;
Response.Write(txtCtrl.Value);
// ·½·¨2£ºÖ±½ÓʹÓÿؼþµÄID
Response.Write(txt.Value);
}
Ïà¹ØÎĵµ£º
u
<BODY></BODY>±ê¼ÇµÄÊÇÍøÒ³µÄÖ÷Ì壺ËüµÄÊôÐÔÓУºtext:Éè¼ÆÒ³ÃæÎÄ×ÖµÄ×ÖÌåÑÕÉ«£» Bgcolor:É趨ҳÃæµÄ±³¾°ÑÕÉ«£»Background:
É趨ҳÃæµÄ±³¾°Í¼Ïñ£» BGPROPERTIES£ºÉ趨ҳÃæµÄͼƬÊÇ·ñËæ×ÅÒ³Ãæ¹ö¶¯¶ø¹ö¶¯£»Link:É趨µÄÁ´½ÓĬÈÏÑÕÉ«£»Alink£ºÉ趨Êó±ê½Ó½üʱµÄÁ´½ÓÑÕÉ«£»Vlink£ºÉ趨ÒѾ·ÃÎʹýµÄÁ ......
ÎÒÏëÔÚaspÖмÓÒ»¸öÁ´½Ó£¬Ö¸Ïòasp.netÍøÒ³£¬µ«asp.netµÄÍøÖ·ÊǾ¹ýHttpUtility.UrlEncode±äÐκÍHttpUtility.UrlDecode±ä»ØµÄ£¬¶øaspµÄserver.urlencodeÈ´²úÉú²»Á˺ÍHttpUtility.UrlEncodeÒ»ÑùµÄ±àÂ룬ÇëÎÊÓÐûÓнâ¾ö°ì·¨
²¹³ä£ºÔÀ´asp.netµÄÊÇ"web.aspx?str="+HttpUtility.UrlEncode(str)
ºÍHttpUtility.UrlDecode(Requ ......
ÒòΪ¸Õ¸Õ½Ó´¥C#ÓïÑÔ²»¾Ã,ÓÚÊÇÎÒ°Ñ¿ØÖÆ̨¸øÈÓÁË,ÒòΪÎÒÌÖÑá¿ØÖÆ̨!
¶øÊÂʵÉÏÎÒÖ»¶ÔWinForm¼¼Êõ¸ÐÐËȤ,µ«ÊÂʵÉϵ½ÏÖÔÚÎÒ·¢ÏÖASP.Net C#µÄWeb¼¼ÊõÊÇÈÕÏÔÖØÒªÆðÀ´!
ÓÚÊÇ¿ªÊ¼½Ó´¥,¸Õ¸ÕÆð²½ÓÚËùÖª,ÓÈÆäÊÇһЩ×î¼òµ¥µÄ¶«Î÷,µ½ÍøÉÏËÑË÷Á˺ܾÃ,²»ÊÇÌ«ÂÒ¾ÍÊÇ˵²»Çå³þ!
¾Ù¸öÀý×ÓÀ´Ëµ,¾Í˵SessionºÃÁË,²»ÖªµÀÍøÉϵÄÄÇЩ¼Ò»ïµ½µ×ÔÚ½²Ê ......
Ä£°å»¯µÄÊý¾Ý°ó¶¨¿Ø¼þΪÎÒÃÇÔÚÒ³ÃæÉÏÏÔʾÊý¾ÝÌṩÁ˸ù±¾µÄÁé»îÐÔ¡£Äã¿ÉÄÜ»¹¼ÇµÃASP.NET v1.xÖеļ¸¸öÄ£°å»¯¿Ø¼þ£¨ÀýÈçDataListºÍRepeater¿Ø¼þ£©¡£ASP.NET 2.0ÈÔȻ֧³ÖÕâЩ¿Ø¼þ£¬µ«ÔÚÄ£°åÖаó¶¨Êý¾ÝµÄÓï·¨ÒѾ±»¼ò»¯ºÍ¸ÄÉÆÁË¡£±¾ÎĽ«ÌÖÂÛÔÚÊý¾Ý°ó¶¨¿Ø¼þÄ£°åÖаó¶¨Êý¾ÝµÄ¶àÖÖ·½·¨¡£
Êý¾Ý°ó¶¨±í´ïʽ
ASP.NET 2.0¸ÄÉÆÁËÄ£°åÖÐ ......
HttpHandlerʵÏÖÁËÀàËÆÓÚISAPI ExtentionµÄ¹¦ÄÜ£¬Ëû´¦ÀíÇëÇó(Request)µÄÐÅÏ¢ºÍ·¢ËÍÏìÓ¦(Response)¡£HttpHandler¹¦ÄܵÄʵÏÖͨ¹ýʵÏÖIHttpHandler½Ó¿ÚÀ´´ïµ½¡£¶øHttpModuleʵÏÖÁËÀàËÆÓÚISAPI FilterµÄ¹¦ÄÜ¡£
HttpModuleµÄʵÏÖ
HttpModulesʵÏÖÁËÀàËÆÓÚISAPI FilterµÄ¹¦ÄÜ£¬ÔÚ¿ª·¢ÉÏ£¬Í¨³£ÐèÒª¾¹ýÒÔϲ½Ö裺
±àдһ¸öÀà£¬Ê ......