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

asp.net ÏÂʵÏÖÎļþÉÏ´«½ø¶ÈÌõ£¨IHttpModule£©

±¾ÎĽ«Ì½ÌÖasp.netÏÂʵÏÖÎļþÉÏ´©½ø¶ÈÌõµÄ·½·¨¡£
Ò»°ãÇé¿öÏ£¬ÒªÊµÏÖÉÏ´«½ø¶ÈÌõÊ×ÏÈҪʵÏÖÉÏ´«Îļþ·Ö¿é¶ÁÈ¡£¬¶øĬÈÏÇé¿öÏ£¬iis½«Ö±½Ó°ÑÉÏ´«µÄÎļþÒ»´Î¶ÁÈëµ½ÄÚ´æÖУ¬ËùÒÔ±¾´¦µÄÄѵãÔÚÓÚÀ¹½ØiisµÄÎļþÉÏ´«¹ý³Ì£¬×ª¶ø×Ô¼ºµÄʵÏÖ·½Ê½¡£ËùÒÔ£¬ÎÒÃÇ¿ÉÒÔʵÏÖÒ»¸öIHttpModuleÀ´´¦ÀíÉÏ´«¹ý³Ì¡£¾ßÌåµÄ¹ý³ÌÊÇApplication_BeginRequestϵõ½µ±Ç°µÄHttpWorkRequest£¬È»ºóͨ¹ýÕâ¸ö¶ÔÏóÀ´µÃµ½µ±Ç°ÇëÇóµÄÀàÐÍ£¬³¤¶È¡£¾ßÌå·½·¨Çë²é¿´ÀàµÄʵÏÖ´úÂ루¸ÃÀàÀ´×ÔÓÚ»¥ÁªÍø£©¡£
ÓÉÓÚÔÚÀàÖÐÒѾ­ÓбȽÏÍêÕûµÄ×¢ÊÍ£¬ËùÒÔÎÒÖ»½éÉÜÒ»¸öÁ÷³Ì£¬Ã»ÓÐÉæ¼°µ½¾ßÌåµÄ·½·¨¡£
ÎÒÃÇ¿ÉÒÔÖªµÀ£¬Èç¹ûÎÒÃÇÈ¡µÃÁË×ܵij¤¶È£¬ÄÇÎÒÃǾͿÉÒÔÉèÖÃÒ»¸ö¹Ì¶¨µÄ³¤¶È£¨±ÈÈç1024×Ö½Ú£©£¬È»ºóÉèÖÃÒ»¸öÑ­»·À´Ã¿´Î¶ÁÈ¡ÕâЩÊý¾Ý£¬ÕâÑù£¬ÎÒÃǾͿÉÒԵõ½µ±Ç°×ܹ²¶ÁÈ¡µÄÄÚÈݳ¤¶È¡£ÄÇÒ³ÃæÉÏÈçºÎµÃµ½µ±Ç°µÄ½ø¶ÈÄØ£¿ÀûÓÃappliaction¶ÔÏóÀ´´æ´¢Êý¾Ý£¬ÕâÑù£¬Ç°Ì¨µÄÒ³ÃæÒ²¿ÉÒÔʹÓÃapplicationÀ´µÃµ½µ±Ç°µÄ½ø¶È¡£ÒòΪapplicationҪʹÓÃÒ»¸ö¼üÀ´È·¶¨ÊÇÄĴεÄÊý¾Ý£¬³£Óõķ½·¨ÊÇ£¬ihttpmoduleÖÐͨ¹ýrequestÀ´È¡µÃÕâ´ÎµÄ¼üÖµ£¬¶øÉÏ´«ÎļþҲͬÑùÓµÓÐÕâÑùÒ»¸ö¼üÖµ¡£Òò´ËÔÚupload.aspxÖеÄpage_loadÖÐÐèÒª£º
this.UploadID = this.Request["UploadID"];
        if (this.UploadID == null)
            this.Response.Redirect("~/user/uploadphotos.aspx?UploadID=" + Guid.NewGuid().ToString()+
                "&itemid="+this.itemid.ToString (), true);
Èç¹ûµÚÒ»´Î½øÈ룬¾ÍÖØÐÂת·¢µ½ÕâÕÅÒ³Ã棬²¢¸øËûÒ»¸öuploadid£¬Í¬Ê±ÔÚHttpUploadModuleÖУº
string uploadId = app.Request.QueryString["UploadID"];//ͬ²½È¡µÃÕâ¸öuploadid
ÄÇÈçºÎÀ´ÊµÊ±¶ÁÈ¡Õâ¸öÊý¾Ý²¢ÏÔʾÔÚÒ³ÃæÖÐÄØ£¿
ÎÒÃÇ¿ÉÒÔÔÚupload.aspxÖÐʹÓÃxmlhttpȥѭ»·ÇëÇóÒ»¸öprogress.aspx£¨Õâ¸öÒ³ÃæÀ´¶ÁÈ¡applicationÖеÄÊý¾Ý£©¡£
µ±È»£¬ÔÚasp.netÖÐÎÒÃÇ»¹¿ÉÒÔʹÓÃasp.net ajaxÀ´ÊµÏÖÕâÒ»¹ý³Ì£¬¾ßÌå·½·¨ÊÇ£º
½¨Á¢Ò»¸öwebservicesÀ´¶ÁÈ¡applicationÖеÄÊý¾Ý£»
ÔÚajaxÖÐÀ´·ÃÎÊÕâ¸öservice£»
ÈçÏÂwebservices¶Ë´úÂ룺
using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using adow.adup.


Ïà¹ØÎĵµ£º

ASP.NET(C#)·µ»ØÉÏÒ»Ò³(ºóÍË)´úÂë

protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        ViewState["BackUrl"] = Request.UrlReferrer.ToString();
    }
}
/// <summary>
/// ·µ»Ø°´Å¥µã»÷ʼþ
/// </summary& ......

ASP.NETÈçºÎ½øÐÐÐÔÄÜÓÅ»¯ÎÊÌâ

Ò»¡¢SqlDataReadºÍDatasetµÄÑ¡Ôñ
SqldatareadÓŵ㣺¶ÁÈ¡Êý¾Ý·Ç³£¿ì¡£Èç¹û¶Ô·µ»ØµÄÊý¾Ý²»Ðè×ö´óÁ¿´¦ÀíµÄÇé¿öÏ£¬½¨ÒéʹÓÃSqlDataReader£¬ÆäÐÔÄÜÒª±ÈdatsetºÃºÜ¶à¡£È±µã£ºÖ±µ½Êý¾Ý¶ÁÍê²Å¿ÉcloseµôÓÚÊý¾Ý¿âµÄÁ¬½Ó
(SqlDataReader ¶ÁÊý¾ÝÊÇ¿ìËÙÏòÇ°µÄ¡£SqlDataReader ÀàÌṩÁËÒ»ÖÖ¶ÁÈ¡´Ó SQL Server
Êý¾Ý¿â¼ìË÷µÄÖ»½øÊý¾ÝÁ÷µ ......

asp.netÎå´óÊý¾Ý·ÃÎʿؼþ¼òµ¥±È½Ï

Êý¾Ý°ó¶¨¿Ø¼þ±È½Ï(Reapter\DataList\GridView\DatailsView\FormView):
1.²åÈ빦ÄÜ·½Ãæ:
DetailsViewºÍFormView¾ßÓвåÈ빦ÄÜ,ÆäËü¿Ø¼þûÓÐ
2.Ä£°å
DataList\FormView\RepeaterÈýÖÖ±ØÐë±à¼­Ä£°å,¶ø
GridViewºÍDetailsViewÖ»ÓÐÔÚ½«ÁÐת»»³ÉÄ£°åÁÐÒÔºó²Å»á³öÏÖ¸÷ÖÖÄ£°å.
3.×Ô¶¯·ÖÒ³¹¦ÄÜ
GridView ,DetailsViewºÍFormView ......

dz̸ASP.NETÒ³ÃæµÄSEOÓÅ»¯

1.ǰ̨ҳÃæÒ»°ã²»ÓÃgridview datalist treeview updatepanel µÈ¿Ø¼þ£¬ÒòΪËûÃÇ»áÉú³ÉºÜ¶àÎÒ²»ÏëÒªµÄ´úÂë¡£¶øÇÒǶÌ×Ò»´ó¶Ñtable
2.ÓÃrepeater+div+css+ul liÒѾ­×ã¹»ÎÒ×öºÜ¶à¶«Î÷ÁË¡£
3.·¢²¼ºóµÄÒ³Ã棬¿ÉÒÔ°ÑһЩ¿ÕÐкͻ»ÐÐ ºÍһЩ²»±ØÒªµÄ¿Õ¸ñÈ¥µô£¬¾¡Á¿¼õÉÙaspxÒ³ÃæµÄÈÝÁ¿¡£Ìá¸ß¼ÓÔØËٶȡ£
4.ÔÚÒ³ÃæµÄtitleдÉϱ¾Ò³ÄÚÈÝ ......

asp.net ÉèÖóö´íÒ³

    <system.web> 
      <!--********³ö´íÒ³µÄÉ趨********-->
    <customErrors mode="On" defaultRedirect="~/Error.htm"> </customErrors> ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ