2011-08-21 216 views
1

我要尋找有關表格的一些準則在我的ASP.NET項目基礎的認證實行ASP.NET窗體基於身份驗證

我有哪裏登錄字段,顯示如下Welcome.ASPX頁面

Welcome.aspx的.vb

用戶輸入 「登錄ID」 - > _LoginID.Text = 「TEST01」

用戶輸入 「密碼」 - > _Password.Text = 「你好」

PersistForms.Checked

點擊登錄按鈕 - > _btnLogin.Click

Protected Sub _Login_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles _Login.Click 

IF LoginID and Password MATCHES = TEUE THEN // Comparison is done from database 


FormsAuthentication.RedirectFromLoginPage(_LoginID.Text, PersistForms.Checked) 

// Using above line it redirects to defailt webpage of my application BUT I WANT TO REDIRECT TO other then default page. How can i do this? ?? How to rediect to EmployeeInfo.ASPX page from here???? 


End Sub 

Web配置更新爲遵循

<authentication mode = "Forms"> 

<forms 

loginUrl = "Login.aspx" 

name = ".ASPXFORMSAUTH" /> 

</authentication> 

<authorization> 

<deny users = "?" /> 

</authorization> 

感謝

+0

爲什麼你不使用登錄控制?它很強大。如果ReturnUrl位於查詢字符串中,將使用 – Maysam

回答

相關問題