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

[ת]Asp.net 2.0Ò³ÃæÑùʽ¶ªÊ§×ܽá

תÔØ×Ô¡¾ÃÏ×ÓEÕ¡¿£ºhttp://blog.csdn.net/net_lover/archive/2007/08/27/1760521.aspx
¾­³£ÓÐÈËÓöµ½ASP.NET 2.0£¨ASP.NET 1.xÖпÉÄÜÊÇÓÐЧµÄ£©ÖÐCSSʧЧµÄÎÊÌ⣬ÏÖ½«Ö÷ÒªÔ­ÒòºÍ½â¾ö·½·¨ÂÞÁÐÈçÏ£º
1.CSSÎļþ·¾¶²»ÕýÈ·
    Õâ¸öÎÊÌâÊôÓÚWeb¿ª·¢ÖеĻù´¡ÎÊÌ⣬һ°ã²ÉÓÃÏà¶Ô·¾¶»á³öÏÖÕâÑùµÄÎÊÌ⣬»òÕßÑùʽÎļþдÔÚÁËĸ°æÒ³ÀïÃ棬ÔÚÄÚÈÝÒ³Óëĸ°æÒ³²»ÔÚͬһ¼¶Ä¿Â¼ÏÂʱ»á³öÏÖÕâÑùµÄÎÊÌâ¡£´ËʱÄãÒªÇå³þWebÖÐÏà¶Ô·¾¶µÄ¹æÔò£¬Èç¹ûÄã²»Çå³þ£¬¿ÉÒÔ²ÉÓþø¶Ô·¾¶µÄд·¨ÊÔÊÔ¾ÍÖªµÀÊDz»ÊÇ·¾¶µÄÎÊÌâÁË¡£
2.CSS¹æÔòд·¨´íÎó
    Õâ¸öÎÊÌâË­Ò²°ï²»Ä㣬ֻÄÜ×Ô¼ºÑ§Ï°CSSµÄÏà¹Ø֪ʶÁË¡£
3.Îļþ±àÂëÎÊÌâ
    ÓÐʱºò£¬CSSÑùʽ·ÅÔÚaspxÎļþÀïÓÐЧ£¬¶ø·ÅÔÚ¶ÀÁ¢µÄÎļþÖÐÎÞЧ£¬ÕâÑùµÄÎÊÌâÈç¹û²»ÊÇ·¾¶ÎÊÌ⣬Ôò¾ÍÊDZàÂëÎÊÌâÔì³ÉµÄ£¬¿ÉÒÔ½«CSSÎļþÓüÇʱ¾´ò¿ª£¬ÔÙÁí´æΪANSI¸ñʽ»òÕßUTF-8¸ñʽ¼´¿É¡£
4.ȨÏÞÎÊÌâ
    ÕâÖÖÇé¿ö³£¼ûµÄÏÖÏóÊǵǼ֮ǰÑùʽÎÞЧ£¬µÇ¼֮ºó²ÅÓÐЧ£¬ÕâÊǵäÐ͵ÄȨÏÞÎÊÌâÔì³ÉµÄ¡£ÓÉÓÚweb.configÅäÖÃÁËËùÓÐÎļþ²»ÔÊÐíÄäÃû·ÃÎÊ£¬²Å»á³öÏÖÕâÑùµÄÎÊÌ⣬½â¾ö·½·¨¾ÍÊǽ«<location>±ê¼Ç½«ÑùʽÎļþÅäÖÃΪÔÊÐíÄäÃû·ÃÎÊ¡£ÀýÈ磺
<configuration>
   <location path="ÔÊÐíÄäÃû·ÃÎʵÄÎļþ¼ÐÃû³Æ»òÕßÎļþ·¾¶">
      <system.web>
         <authorization>
            <allow users="?"/>
         </authorization>
      </system.web>
   </location>
</configuration>
5.µ¥»÷°´Å¥ÑùʽʧЧ
    ÕâÖÖÇé¿ö×îµäÐ͵ÄÔ­ÒòÊǵ¥»÷°´Å¥Ê¼þÀïÓÐÀàËÆResponse.WriteÕâÑùµÄÓï¾ä£¬ÓÉÓÚASP.NET 2.0ĬÈϲÉÓÃhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtdÎĵµÀàÐͶ¨Ò壬Ëü¾ÍÒªÇóÔÚ<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">µÄÇ°Ãæ²»ÄÜÓÐÈκÎÊä³ö¡£ÕâÖÖÎÊÌâµÄ½â¾ö·½·¨ÊDzÉÓÃClientScriptManagerÊä³ö£¬»òÕß²ÉÓÃLiteral¿Ø¼þÊä³öÄÚÈÝ¡£
    [תÔز¹³ä]
  &nbs


Ïà¹ØÎĵµ£º

asp.net×Ô¶¨Òå´íÎó´¦ÀíÒ³ÃæµÄ¼¸ÖÖ·½·¨

ASP.NET ÌṩÈýÖÖÓÃÓÚÔÚ³öÏÖ´íÎóʱ²¶»ñºÍÏìÓ¦´íÎóµÄÖ÷Òª·½·¨£ºPage_Error ʼþ¡¢Application_Error ʼþÒÔ¼°Ó¦ÓóÌÐòÅäÖÃÎļþ (Web.config)¡£
Èç¹ûÄú²»µ÷Óà Server.ClearError »òÕß²¶»ñ Page_Error »ò Application_Error ʼþÖеĴíÎó£¬Ôò½«¸ù¾Ý Web.config ÎļþµÄ <customErrors> ²¿·ÖÖеÄÉèÖô¦Àí´íÎó¡£ÔÚ <cus ......

½üÆÚ×÷Æ· asp.netÍøÒ³°æ¶·µØÖ÷(δÍê´ýÐø)

Ê×ÏÈÉêÃ÷ ´¿Êô¸öÈËÁ·Ï°Ö®×÷ ÇëÎðÓÃÓÚÉÌҵĿµÄ..........ÎÞÓï
¼ÍÄîÒ»ÏÂÎÒÒÔÇ°µÄÒ»¸ö×÷Æ·<¿ú>,ÒÔºó¾ÍÓÃËüµ±ÎÒµÄLOGOÁË
½ñÌìÊÇÊ×·¢,ÕâƪÎÄÕÂÎÒ»á³ÖÐø¸üÐÂ,ÎÒ²ÎÕÕÁËÔ°ÇøÀïÇ°±²µÄ¾­Ñé,ÃþË÷×ÅȥʵÏÖ,Ä¿Ç°´óÌåµÄ»¹Î´ÍêÉÆ,ÏÈ·¢ÕÅͼÉÏÀ´...
......

ASP.NET(C#)·µ»ØÉÏÒ»Ò³(ºóÍË)´úÂ루תÔØ£©

ASP.NET(C#)·µ»ØÉÏÒ»Ò³(ºóÍË)´úÂë
2008-08-10 10:32
protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        ViewState["BackUrl"] = Request.UrlReferrer.ToString();
    }
}
/// <s ......

asp.net ¿ª·¢³£Óõķ½·¨¶þ

asp.net ¿ª·¢Öг£ÓõÄһЩ·½·¨×ܽáËäȻдµÄ²»ºÃ,µ«ºÜʵÓÃ
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Net;
using System.Text.RegularExpressions;
using System.Web.UI;
using System.Web.SessionState;
using System.Web.UI.WebControls;
using Syst ......

¿ØÖÆAsp.netµÄButton¿Ø¼þµÄÌá½»¶¯×÷

asp.net¿ª·¢ÖУ¬Í¨³£ÐèÒª×öһЩ¿Í»§¶ËÑéÖ¤¡£µ±ÎÒÃÇĬÈÏÔÚÒ»¸öÒ³ÃæÖмӸöbutton¿Ø¼þʱ£¬Õâ¸öButton±»asp.net Êä³öΪһ¸öSubmit°´Å¥¡£ asp:Button ID=Button1 runat=server Text=Button on click=Button1_Click /
ÔÚ_doPostBack·½·¨ÄÚ£¬Í¨¹ýtheForm.submit()À´Ê¹Êý¾ÝÌá½»µ½·þÎñÆ÷¡£
ÕâÑùºÜÈÝÒ׿´³ö£¬Èç ¹ûÎÒÃÇÏëÒªÔÚÊý¾ÝÌá½ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ