ASP.NET
¶þ¡¢Ïò ASP.NET ÍøÒ³Ìí¼Ó HTML ·þÎñÆ÷¿Ø¼þ
HTML ·þÎñÆ÷¿Ø¼þÊÇÄú¿ÉÒÔ¶ÔÆä½øÐÐÅäÖÃÒÔ±ã¿ÉÒÔʹÓ÷þÎñÆ÷´úÂë¶ÔÆä½øÐбà³ÌµÄ HTML ÔªËØ¡£
1¡¢ÈçºÎ£ºÊ¹Óà ASP.NET Óï·¨ÏòÍøÒ³Ìí¼Ó HTML ·þÎñÆ÷¿Ø¼þ
Ìí¼Ó HTML ·þÎñÆ÷¿Ø¼þºÍÌí¼ÓÈÎÒâ HTML ÔªËØÀàËÆ£¬²»Í¬Ö®´¦ÔÚÓÚÄúÐèÒª½«ÔªËØת»»Îª¿Ø¼þ£¬ÒÔ±ã¿ÉÒÔÔÚ·þÎñÆ÷´úÂëÖÐʹÓÃËü£¬¿ÉÒÔͨ¹ýÔÚ .aspx ÎļþÖÐÖ±½ÓÉùÃ÷ HTML ·þÎñÆ÷¿Ø¼þÏòÒ³ÖÐÌí¼ÓÕâÖֿؼþ¡£
Ìí¼Ó HTML ·þÎñÆ÷¿Ø¼þ
·¼üÈëÒªÓÃ×÷¿Ø¼þµÄÔªËØµÄ HTML Óï·¨¡£°üº¬¸ÃÔªËصij£¹æ HTML Óï·¨£¬ÁíÍâÇëÖ´ÐÐÒÔϲÙ×÷£º
·³ý·Ç¿Ø¼þÊǸ´ÔӿؼþµÄ×é³É²¿·Ö²¢ÇÒ½«Öظ´³öÏÖ£¨ÈçÔÚ Repeater¡¢DataList ºÍ GridView ¿Ø¼þÖУ©£¬·ñÔò½«¸Ã¿Ø¼þµÄ ID ÊôÐÔÉèÖÃΪ¶ÔÓÚ¸ÃҳΨһµÄÖµ¡£
·ÉèÖà runat="server" ÊôÐÔÒÔ½«ÔªËØת»»Îª¿Ø¼þ¡£
ÏÂÃæµÄʾÀýÑÝʾÈçºÎÉùÃ÷ HtmlInputText ¿Ø¼þ¡¢HtmlInputText ¿Ø¼þ¡¢HtmlInputButton ¿Ø¼þºÍ HtmlAnchor ¿Ø¼þ£º
<input id="Name" type="text" size="40" runat="server" />
<input type="submit" id="Enter" value="Enter" runat="server" />
Click <a id="Anchor1" runat="server" href="more.html">More </a> to see the next page.
2¡¢ÈçºÎ£º½« HTML ·þÎñÆ÷¿Ø¼þת»»Îª HTML ÔªËØ
Èç¹ûÄú²»ÔÙÐèÒªÔÚ·þÎñÆ÷´úÂëÖÐ¶Ô HTML ·þÎñÆ÷¿Ø¼þ±à³Ì£¬ÔòÓ¦½«Æäת»»Îª´¿ HTML ÔªËØ¡£Ò³ÖеÄÿ¸ö HTML ·þÎñÆ÷¿Ø¼þ¶¼Ê¹ÓÃ×ÊÔ´£¬Òò´Ë×îºÃ¾¡Á¿¼õÉÙ ASP.NET ÍøÒ³±ØÐëʹÓõĿؼþµÄÊýÄ¿¡£
½« HTML ·þÎñÆ÷¿Ø¼þת»»Îª HTML ÔªËØ
·´Ó¿Ø¼þ±ê¼ÇÖÐÒƳý runat="server" ÊôÐÔ¡£
·Äú²»±ØÒƳý ID ÊôÐÔ¡£Èç¹û´æÔÚÒýÓøÃÔªËصĿͻ§¶Ë½Å±¾£¬ÔòÎñÇëСÐÄ£¬Ç§Íò²»ÒªÒƳý ID ÊôÐÔ¡£
Ïà¹ØÎĵµ£º
ÔÚÐí¶àÓ¦ÓóÌÐòÖУ¬ÐèÒª´æ´¢²¢Ê¹ÓöÔÓû§Î¨Ò»µÄÐÅÏ¢¡£Óû§·ÃÎÊÕ¾µãʱ£¬Äú¿ÉÒÔʹÓÃÒÑ´æ´¢µÄÐÅÏ¢ÏòÓû§ÏÔʾ Web Ó¦ÓóÌÐòµÄ¸öÐÔ»¯°æ±¾¡£¸öÐÔ»¯Ó¦ÓóÌÐòÐèÒª´óÁ¿µÄÔªËØ£º±ØÐëʹÓÃΨһµÄÓû§±êʶ·û´æ´¢ÐÅÏ¢£¬Äܹ»ÔÚÓû§ÔٴηÃÎÊʱʶ±ðÓû§£¬È»ºó¸ù¾ÝÐèÒª»ñÈ¡Óû§ÐÅÏ¢¡£ÈôÒª¼ò»¯Ó¦ÓóÌÐò£¬¿ÉÒÔ ......
ASP.NET Óû§ÅäÖÃÎļþ¹¦ÄÜÉè¼ÆΪÌṩµ±Ç°Óû§µÄ¶ÀÓÐÐÅÏ¢¡£ÅäÖÃÎļþ¿ÉÓÉͨ¹ýÉí·ÝÑéÖ¤µÄÓû§Ê¹Óã¬Ò²¿ÉÒÔÓÉÄäÃû£¨Î´¾Éí·ÝÑéÖ¤£©Óû§Ê¹Óá£
1¡¢Í¨¹ýÉí·ÝÑéÖ¤µÄÓû§
ĬÈÏÇé¿öÏ£¬Óû§ÅäÖÃÎļþÓ뵱ǰ HTTP ÉÏÏÂÎÄ£¨¿Éͨ¹ý HttpContext..::.Current ÊôÐÔ·ÃÎÊ£©µÄ User ÊôÐÔÖд洢µÄÓà ......
Èý²ã¼Ü¹¹(3-tier application) ͨ³£ÒâÒåÉϵÄÈý²ã¼Ü¹¹¾ÍÊǽ«Õû¸öÒµÎñÓ¦Óû®·ÖΪ£º±íÏֲ㣨UI£©¡¢ÒµÎñÂß¼²ã£¨BLL£©¡¢Êý¾Ý·ÃÎʲ㣨DAL£©¡£Çø·Ö²ã´ÎµÄÄ¿µÄ¼´ÎªÁË“¸ßÄÚ¾Û£¬µÍñîºÏ”µÄ˼Ïë¡£
1¡¢±íÏֲ㣨UI£©£ºÍ¨Ë×½²¾ÍÊÇÕ¹ÏÖ¸øÓû§µÄ½çÃ棬¼´Óû§ÔÚʹÓÃÒ»¸öϵͳµÄʱºòËûµÄËù¼ûËùµÃ¡£
2¡¢ÒµÎñ ......
½ñÌìΪÁË×ö²åÈëÊý¾ÝÕÒÁ˲»ÉÙ¶«Î÷£¬ÒòΪ´ÓÀ´Ã»ÓÐд¹ý¶ÁдExcel£¬Ò²²»ÖªµÀ¸ÃÔõôд¡£ÏÂÃæµÄÊǽñÌìͨ¹ý²é¿´ÂÛ̳×Ô¼ºÐ´³öÀ´ÁË¡£
¹¦ÄÜÊǶÁÈ¡Excel È»ºó°ÑÊý¾Ý²åÈëÊý¾Ý¿â¡£Õâ¸ö¹¦ÄÜÔÚÆóÒµÀïÊǷdz£³£¼ûµÄÒ²Êdz£Óõģ¬Ï£Íû¶ÔÅóÓÑÃÇÓаïÖú£¡
/// <summary>
/// µ¼Èëexcel
/// </ ......