vs2008 asp.net: Login控件
用Login控件登录后会自动打开名为Login.aspx的网页。
我搜索了machine.config和web.config,没发现Login.aspx字样
那么我在哪里能设置登录后转到的网页呢? 是否也可以在登录后只执行一段C#代码,而不跳转到任何网页呢?
[解决办法]
你是说默认转入Default.aspx?这个是login控件的代码写死的呀,你可以看一下login的源代码
public static void Initialize(){ if (!_Initialized) { lock (_lockObject) { if (!_Initialized) { AuthenticationSection authentication = RuntimeConfig.GetAppConfig().Authentication; authentication.ValidateAuthenticationMode(); _FormsName = authentication.Forms.Name; _RequireSSL = authentication.Forms.RequireSSL; _SlidingExpiration = authentication.Forms.SlidingExpiration; if (_FormsName == null) { _FormsName = ".ASPXAUTH"; } _Protection = authentication.Forms.Protection; _Timeout = (int) authentication.Forms.Timeout.TotalMinutes; _FormsCookiePath = authentication.Forms.Path; _LoginUrl = authentication.Forms.LoginUrl; if (_LoginUrl == null) { _LoginUrl = "login.aspx"; } _DefaultUrl = authentication.Forms.DefaultUrl; if (_DefaultUrl == null) { _DefaultUrl = "default.aspx"; } _CookieMode = authentication.Forms.Cookieless; _CookieDomain = authentication.Forms.Domain; _EnableCrossAppRedirects = authentication.Forms.EnableCrossAppRedirects; _TicketCompatibilityMode = authentication.Forms.TicketCompatibilityMode;[code=C#]