简体   繁体   中英

asp.net login control

im using asp.net for my webpage. im also using the login control too. i want it so when the user types in the correct user name and password, it redirects to a new page called test.aspx. i dont want to use login view.

您可以使用以下属性: http : //msdn.microsoft.com/zh-cn/library/system.web.ui.webcontrols.login.destinationpageurl.aspx或者,您可以挂钩到登录事件并使用Response.Redirect进行重定向使用C#/ VB.NET代码。

But what actually is the problem here? You may want to build your own login mechanism. It may be as simple as placing two textboxes and a button on a page and then checking if the values provided are correct. To redirect the user to another page on successful login you may want to use:

Response.Redirect(url);

Be sure to check on the page that you are redirecting to that the user is authenticated and authorized to view this page (by using Session variables or whatever).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM