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

ASP.NETÅжÏÓû§ÊÇ·ñµÇ¼

Ç°¶Îʱ¼äÒòΪһÌض¨ÐèÇóдÁËÏÂÃæ´úÂë¡£ÐèÇóÈçÏ£ºÔÚÓû§·ÃÎʱ¾Õ¾ËùÓÐaspxÒ³Ãæʱ£¬Ê×ÏÈÅжÏÓû§Session["login"]ÊÇ·ñ´æÔÚ£¬Èç¹û²»´æÔÚ£¬ËµÃ÷¸ÃÓû§Î´µÇ½£¬ÒªÈøÃÓû§Ìøתµ½Ö¸¶¨µÄÒ³Ãæ¡£ËùÒÔÏëдһ¸öSessionµÄ¹ýÂËÆ÷£¬Ë¼Ç°ÏëºóÓ¦¸Ãдһ¸ö¼Ì³ÐIHttpModuleµÄ´¦ÀíÀà¡£ÊÔÑéÁ˼¸ÖÖ·½Ê½·¢ÏÖÖ»Óн«·½·¨¼ÓÔÚ.AcquireRequestStateÖвÅÄܶÁÈ¡session¡£
¹²Ïí´úÂëÈçÏ MyModule.cs
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
/// <summary>
/// MyModule µÄժҪ˵Ã÷
/// </summary>
public class MyModule:IHttpModule
{
    public MyModule()
    {
        //
        // TODO: ÔÚ´Ë´¦Ìí¼Ó¹¹Ô캯ÊýÂß¼­
        //
    }
    #region IHttpModule ³ÉÔ±
    public void Dispose()
    {
        throw new Exception("The method or operation is not implemented.");
    }
    public void Init(HttpApplication context)
    {
        context.AcquireRequestState += new EventHandler(application_AcquireRequestState);
    }
    public void application_AcquireRequestState(object sender, EventArgs e)
    {
        HttpApplication app = (HttpApplication)sender;
        
        if (app.Context.Session["userName"] == null || app.Context.Session["userName"].ToString().Trim() == "")
        {
            app.Context.Server.Transfer("login.aspx");
  &


Ïà¹ØÎĵµ£º

asp.net Ò³Ãæ¼ä´«ÖµÓëÌøתµÄÇø±ð

ÔÚa.aspxÌøתµ½b.aspx
ͨ¹ýServer.Transfer("b.aspx") ÓëResponse.Redirect("b.aspx")µÄÇø±ð
Èç¹ûÊÇͨ¹ýͨ¹ýServer.Transfer()ÔÚa.aspxÌøתµ½b.aspxµÄ£¬ÔòÔÚb.aspxÒ³Ã棬¿ÉÒÔ²éÕÒµ½±£´æÔÚa.aspxÒ³ÃæÖÐµÄ ¿Ø¼þÖеÄÖµ£¬Èç¹ûÊÇResponse.Redirect(),ÔòµÃ²»µ½µ½a.aspxÒ³ÃæÖпؼþµÄÖµ¡£
Èç¹ûÊÇͨ¹ýServer.Transfer("b.aspx" ......

ASP.NET Ò³Ãæ¼ä´«Öµ

ÔÚÒ³Ãæ¼äÌøת,»áÉæ¼°µ½ÖµºÍÊý¾ÝµÄ´«µÝÎÊÌâ.ÌØÓñ¾ÎĽ«ÎÒÖªµÀµÄһЩ·½·¨¹éÄÉÒ»ÏÂ.
1.´ø²ÎÊý´«µÝ
Óŵã:ʹÓ÷½±ã
ȱµã:°²È«ÐÔµÍ,Êʺϴ«µÝ¼òµ¥ÀàÐ͵ĶÔÏó,±ÈÈçÊý×Ö.×Ö·û.µ«¶Ô¶ÔÏó.Êý×éµÈ²»ºÏÊÊ´«µÝ.
Ó¦ÓÃ:
a.°²È«ÐÔ²»¸ß,Ó¦¶Ô·½Ê½:¶Ô´«µÝµÄÖµ½øÐмÓÃÜ.
b.´«µÝ¼òµ¥ÀàÐ͵ĶÔÏó.Ó¦¶Ô·½Ê½:ÔÚ´«µÝҳͨ¹ý¼òµ¥ÀàÐͶÔÏó¸ø³ö±êʶ,ÔÚ ......

asp.netµÄcom·½Ê½µ¼³öexcel

×î½ü×ö¸öÏîÄ¿£¬ÐèÒªµ¼³öexcel£¬ÒªÖ÷´Ó±íÒ»Æðµ¼³öµÄ£¬¾Í´óÖÂдÁËÒ»¸ö·½·¨£¬¿ÉÄܸñʽ·½Ã滹ÊÇ»á½øÐÐÐ޸ģ¬ÏÈÌù³öÀ´·½±ãÒÔºó²é¿´
ÏîÄ¿ÒýÓÃ΢ÈíexcelµÄcomµÄdll¼´¿É
/// <summary>
/// ¹¦ÄÜ£ºµ¼³öÎļþ£¨Í¨¹ýÊý¾ÝÔ´µ¼³ö,¿ÉÖ÷´Ó±íµ¼³ö£©
/// </summary>
/// <param name="strTitle" ......

ASP.NET Cache_µÚһƪ_»º´æ¸ÅÊö

+++ ÔÚWebÓ¦ÓóÌÐò¿ª·¢ÖУ¬»º´æ¶ÔÓ¦ÓóÌÐòÐÔÄܵÄÌá¸ßÓкܴó°ïÖú¡£±ÈÈ磬ÔÚͬһ¸öÓ¦ÓÃÖУ¬¾­³£·¢Éú¶ÔͬһÊý¾Ý¡¢Âß¼­¹¦ÄܺÍÓû§½çÃæµÄ¶à´ÎÇëÇó¡£µ±Óû§µÄ»ùÊýºÜ´óʱ£¬Èç¹ûÿ´ÎµÄÇëÇ󶼽øÐд¦Àí£¬Ôò»áÏûºÄºÜ¶àµÄ·þÎñÆ÷×ÊÔ´¡£ÁíÍ⣬ÓÐʱ·þÎñÆ÷ÌṩµÄÊý¾Ý·þÎñ¿ÉÄÜ»áÒâÍâµØÍ£Ö¹£¬Ê¹Óûº´æ¼¼Êõ¿ÉÒÔÔÚÒ»¶¨Ê±¼äÄÚÈÔÈ»Õý³£µØÌṩ¶Ô×îÖ ......

Asp.netÖÐFramesetµÄʹÓÃ

<FRAMESET> <FRAME>
<NOFRAMES>
<IFRAME>
¡ö ¿ò¼Ü¸ÅÄî £º
Ëùν¿ò¼Ü±ãÊÇÍøÒ³»­Ãæ·Ö³É¼¸¸ö¿ò´°£¬Í¬Ê±È¡µÃ¶à¸ö URL¡£Ö»¡¡Òª <FRAMESET> <FRAME> ¼´¿É£¬¶øËùÓпò¼Ü±ê¼Ç¡¡Òª·ÅÔÚÒ»¸ö×ÜÆðµÄ html µµ£¬Õâ¸öµµ°¸Ö»¼Ç¼Á˸ÿò¼Ü ÈçºÎ»®·Ö£¬²»»áÏÔʾÈκÎ×ÊÁÏ£¬ËùÒÔ²»±Ø·ÅÈë <BODY> ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ