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");
&
Ïà¹ØÎĵµ£º
ÔÚ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" ......
ÔÚÒ³Ãæ¼äÌøת,»áÉæ¼°µ½ÖµºÍÊý¾ÝµÄ´«µÝÎÊÌâ.ÌØÓñ¾ÎĽ«ÎÒÖªµÀµÄһЩ·½·¨¹éÄÉÒ»ÏÂ.
1.´ø²ÎÊý´«µÝ
Óŵã:ʹÓ÷½±ã
ȱµã:°²È«ÐÔµÍ,Êʺϴ«µÝ¼òµ¥ÀàÐ͵ĶÔÏó,±ÈÈçÊý×Ö.×Ö·û.µ«¶Ô¶ÔÏó.Êý×éµÈ²»ºÏÊÊ´«µÝ.
Ó¦ÓÃ:
a.°²È«ÐÔ²»¸ß,Ó¦¶Ô·½Ê½:¶Ô´«µÝµÄÖµ½øÐмÓÃÜ.
b.´«µÝ¼òµ¥ÀàÐ͵ĶÔÏó.Ó¦¶Ô·½Ê½:ÔÚ´«µÝҳͨ¹ý¼òµ¥ÀàÐͶÔÏó¸ø³ö±êʶ,ÔÚ ......
×î½ü×ö¸öÏîÄ¿£¬ÐèÒªµ¼³öexcel£¬ÒªÖ÷´Ó±íÒ»Æðµ¼³öµÄ£¬¾Í´óÖÂдÁËÒ»¸ö·½·¨£¬¿ÉÄܸñʽ·½Ã滹ÊÇ»á½øÐÐÐ޸ģ¬ÏÈÌù³öÀ´·½±ãÒÔºó²é¿´
ÏîÄ¿ÒýÓÃ΢ÈíexcelµÄcomµÄdll¼´¿É
/// <summary>
/// ¹¦ÄÜ£ºµ¼³öÎļþ£¨Í¨¹ýÊý¾ÝÔ´µ¼³ö,¿ÉÖ÷´Ó±íµ¼³ö£©
/// </summary>
/// <param name="strTitle" ......
+++ ÔÚWebÓ¦ÓóÌÐò¿ª·¢ÖУ¬»º´æ¶ÔÓ¦ÓóÌÐòÐÔÄܵÄÌá¸ßÓкܴó°ïÖú¡£±ÈÈ磬ÔÚͬһ¸öÓ¦ÓÃÖУ¬¾³£·¢Éú¶ÔͬһÊý¾Ý¡¢Âß¼¹¦ÄܺÍÓû§½çÃæµÄ¶à´ÎÇëÇó¡£µ±Óû§µÄ»ùÊýºÜ´óʱ£¬Èç¹ûÿ´ÎµÄÇëÇ󶼽øÐд¦Àí£¬Ôò»áÏûºÄºÜ¶àµÄ·þÎñÆ÷×ÊÔ´¡£ÁíÍ⣬ÓÐʱ·þÎñÆ÷ÌṩµÄÊý¾Ý·þÎñ¿ÉÄÜ»áÒâÍâµØÍ£Ö¹£¬Ê¹Óûº´æ¼¼Êõ¿ÉÒÔÔÚÒ»¶¨Ê±¼äÄÚÈÔÈ»Õý³£µØÌṩ¶Ô×îÖ ......
<FRAMESET> <FRAME>
<NOFRAMES>
<IFRAME>
¡ö ¿ò¼Ü¸ÅÄî £º
Ëùν¿ò¼Ü±ãÊÇÍøÒ³»Ãæ·Ö³É¼¸¸ö¿ò´°£¬Í¬Ê±È¡µÃ¶à¸ö URL¡£Ö»¡¡Òª <FRAMESET> <FRAME> ¼´¿É£¬¶øËùÓпò¼Ü±ê¼Ç¡¡Òª·ÅÔÚÒ»¸ö×ÜÆðµÄ html µµ£¬Õâ¸öµµ°¸Ö»¼Ç¼Á˸ÿò¼Ü ÈçºÎ»®·Ö£¬²»»áÏÔʾÈκÎ×ÊÁÏ£¬ËùÒÔ²»±Ø·ÅÈë <BODY> ......