asp.net ¿Ø¼þ¿ª·¢»ù´¡(1)
ÔÌûµØÖ·£ºhttp://www.cnblogs.com/clingingboy/archive/2006/07/30/463471.html
asp.net±¾ÉíÌṩÁ˺ܶà¿Ø¼þ,Ìṩ¸øÎÒÃÇÕâЩ±È½ÏÀÁ¶èµÄÈËʹÓÃ,ÎÒÈÏΪ¿Ø¼þµÄ×÷ÓþÍÔÚ´Ë,ÒòΪÎÒÃDz»ÏëÖظ´¹¤×÷,ËùÒÔÒª´´½¨Ëü,Õâ¸ö±¾Éí±ãÊÇ
Ò»¸öÐèÇóµÄ¹Øϵ,ËùÒÔѧϰ¿Ø¼þ¿ª·¢ºÜÓÐÒâ˼.
wroxÍøÕ¾ÉÏÓб¾Êé Professional ASP.NET 2.0 Server Control and
Component Development
ÏÖÔÚ»¹Ã»Óгö°æ,µ«ÍøÕ¾ÉϷųöÁË´úÂë,ËùÒÔÕýºÃÏÂÔعýÀ´Ñ§Ï°Ò»ÏÂ.
ÎÒ¿´¹ýÇ°¼¸Õ´úÂë,»·»·Ïà¿Û,×÷ÕßÓò»Í¬µÄ֪ʶÏòÎÒÃÇչʾͬһ¸öЧ¹û,ËùÒÔÑÐò½¥½øµÄѧÏÂÀ´ºÜÓкô¦.
ËäÈ»×Ô¼º¶Ô¿Ø¼þ¿ª·¢»¹²»ÊǺÜÊìϤ£¬µ«ÎҸоõÒÔϼ¸µãºÜÖØÒª£¬ÊÇÎÒ×Ô¼º×ܽáµÄ
1.Á˽â¿Ø¼þÖ®¼äµÄ¼Ì³Ð¹Øϵ
×îºÃÊÇÏÈ¿´¿´¿´System.Web.UIÃüÃû¿Õ¼ä
(1)Control À࣬ËùÓеĿؼþ¶¼¹²ÏíµÄÒ»¸öÀ࣬ÄãÐèҪȥ¿´ÏÂÆäÀïÃæÊܱ£»¤µÄ¼¸¸ö·½·¨ºÍÊôÐÔ£¬ËäȻһÏ¿´²»Í꣬ÒÔºó»á·¢ÏÖ³£³£Óõ½ÕâЩ·½·¨
´ó¼Ò¿ÉÒÔÔÚMSDN¿´Ò»ÏÂÆäÅÉÉúÀà
(2)HtmlTextWriter Àà
²»µÃ²»Á˽âµÄÒ»¸öÀ࣬Ö÷Òª¹¤×÷¾ÍÊÇÎÒÃÇдµÄ±ê¼Ç×Ö·ûºÍÎı¾Êä³ö
2.ÖØд·½·¨
(1) ±ØÐë¼Ì³ÐControlÀà
(2) ÖØдControlÀàµÄRender·½·¨£¬Õâ¸öÊDZØÐëµÄ£¬ÒòΪÆäËû¿Ø¼þ¶¼¼Ì³ÐÁËControl
ÀàÀ࣬ËùÒÔ¼¸ºõËùÓпؼþ¶¼ÓÐÕâ¸ö·½·¨
3.ÊìϤԪÊý¾Ý
´ó¼Ò¶¼ÖªµÀasp.net¿Ø¼þÊôÐÔÔÚ±à¼Æ÷ÉÏÊÇ·ÖÀàµÄ£¬ÈçÍâ¹Û£¬ÐÐΪ£¬²¼¾ÖµÈ£¬Ã¿¸öÊôÐÔ»¹¸ø³öÁ˽âÊÍ
¼òµ¥µÄÔªÊý¾Ý¾ÍÊÇÆðµ½Õâ¸ö×÷Ó㬵±È»ÄãÒ²¿ÉÒÔ²»¼Ó£¬µ«Ê¹ÓÃÁËÔªÊý¾ÝÈÃÈ˸е½ÓÐÇ×ÇиУ¬Ð´·¨Èç
ÏÂ
[CategoryAttribute("Appearance")]
ҪʹÓÃÔªÊý¾Ý£¬±ØÐëÒýÓÃSystem.ComponentModelÃüÃû¿Ø¼þ£¬Ò»°ãÄãÈç¹ûд×é¼þµÄ»°£¬²»¿ÉÄܲ»Óõ½ÕâÑùÀà¿â¡£¾ßÌåµÄMSDNÉÏÓÐËù
½éÉÜ¡£
Ò».Êä³ö×Ö·û´®
˵¶àÁËûÒâ˼£¬»¹ÊÇÀ´ÑÝÁ·°É¡£Ê×ÏÈÄãµÃÁ˽âHTML¡£À´¿´ÏÂÃæ´úÂë,Ч¹û¾ÍÊÇÊä³ö
HTMLµ½¿Í»§¶Ë
ʾÀýÒ»
using
System;
using
System.Web.UI;
namespace
CustomComponents
{
/**/
///
<summary>
///
Summary description for CreditCardForm
///
</summary>
public
class
CreditCardForm1 : Control
{
protected
override
void
Render(HtmlTextWriter writer)
{
&nbs
Ïà¹ØÎĵµ£º
ģ̬´°¿Úÿ´ÎÒ³ÃæÖØдò¿ª²»Ë¢Ð¡£
»º´æµÄÔÒò£¬¸Ä³ÉÕâÑù£º
½â¾ö°ì·¨¡£¡£¡£
url = frmWin + "? " + Math.random();
window.showModalDialog(url,me, 'dialogWidth= '+width + 'px;dialogHeight= '+height+ 'px;help:no;status:no;resizable:no;scro ll:no; ......
ÈÏʶASP.NETÅäÖÃÎļþWeb.config
¡¡Ò»¡¢ÈÏʶWeb.configÎļþ
Web.configÎļþÊÇÒ»¸öXMLÎı¾Îļþ£¬ËüÓÃÀ´´¢´æ ASP.NET Web Ó¦ÓóÌÐòµÄÅäÖÃÐÅÏ¢£¨Èç×î³£ÓõÄÉèÖÃASP.NET Web Ó¦ÓóÌÐòµÄÉí·ÝÑéÖ¤·½Ê½£©£¬Ëü¿ÉÒÔ³öÏÖÔÚÓ¦ÓóÌÐòµÄÿһ¸öĿ¼ÖС£µ±Äãͨ¹ýVB.NETн¨Ò»¸öWebÓ¦ÓóÌÐòºó£¬Ä¬ÈÏÇé¿öÏ»áÔÚ¸ùĿ¼×Ô¶¯´´½¨Ò»¸öĬÈϵÄ
W ......
ÔÚ¸´ÔÓµÄÒµÎñÓ¦ÓóÌÐòÖУ¬ÓÐʱºò»áÒªÇóÒ»¸ö»òÕ߶à¸öÈÎÎñÔÚÒ»¶¨µÄʱ¼ä»òÕßÒ»¶¨µÄʱ¼ä¼ä¸ôÄڼƻ®½øÐУ¬±ÈÈ綨ʱ±¸·Ý»òͬ²½Êý¾Ý¿â£¬¶¨Ê±·¢Ë͵ç×ÓÓʼþ£¬¶¨ÆÚ´¦ÀíÓû§×´Ì¬ÐÅÏ¢£¬Ö§¸¶ÏµÍ³Öж¨ÆÚͬ²½Òì³£Õ˵¥µÈµÈ£¬ÎÒÃdzÆ֮Ϊ¼Æ»®ÈÎÎñ¡£ÊµÏּƻ®ÈÎÎñµÄ·½·¨Ò²Óкܶ࣬¿ÉÒÔ²ÉÓÃSQLAgentÖ´Ðд洢¹ý³Ì£¬²ÉÓÃWindowsÈÎÎñµ÷¶È³ÌÐòÀ´ÊµÏÖ£ ......
ÔÚ.Net 4.0֮ǰÎÒÃÇΪÁË×ö³öËÑË÷ÒýÇæÓѺõģ¬¶ÔÓû§Ò²ÓѺõÄurl¶¼ÊÇÐèÒª×Ô¼ºÊµÏÖUrlÖØд£¬ÏÖÔÚ²»ÐèÒªÁË£¬.Net 4.0ΪÎÒÃÇ×öÕâÒ»ÇС£UrlRoutingÖ®ËùÒÔ³Æ֮ΪRoutingÊÇÒòΪËü²»µ«ÊµÏÖÁËUrlÖØд»¹¿ÉÒÔͨ¹ý²ÎÊýµÃµ½ÖØдºóµÄUrlÔÚÒ³ÃæÉÏʹÓá£
1. Url Routing µÄͨ³£Ó÷¨
UrlRoutingÔÚAsp.Net MvcÏîÄ¿Öб»¹ã·ºÊ¹Óã¬ÔÚMvcÖкܺà ......