Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 13, 2012 06:10 AM by luckystar_2012
0 Points
14 Posts
Apr 13, 2012 03:38 AM|LINK
Can someone help me to migrate three functions mentioned as below from asp language to asp.net??? thanks in advance..
1. Sub successLogin Session("UserName") = "ok" Session("Password") = "ok" Session("user_login_name") = UserName Response.Cookies("uname") = UserName Response.Cookies("uname").Expires = DateAdd ("h", 12, Now) Session("logonattempt") = 0 Response.Redirect("main.asp") End sub 2. Sub loginFailed Response.Write"<P><B>" & Replace (reason, "\n", "<BR>") & "</B></P>" Response.Write"<P><A href=""default.asp"">Back</A></P>" Session("logonattempt") = Session("logonattempt") + 1 End sub
3. Sub changePassword Response.Redirect("ChangePassword.asp") End sub
All-Star
154905 Points
19866 Posts
Moderator
MVP
Apr 13, 2012 05:17 AM|LINK
Use the built in membership provider. All the functions you need to use for managing login and so on are already there: http://msdn.microsoft.com/en-us/library/yh26yfzy.aspx
By the way, if you really want code, you need to say whether you want VB or C#.
Apr 13, 2012 06:10 AM|LINK
Thanks for ur reply! I want to convert to Asp.Net in VB.Net..
luckystar_20...
0 Points
14 Posts
Get Help Converting Asp to Asp.Net(VB)
Apr 13, 2012 03:38 AM|LINK
Can someone help me to migrate three functions mentioned as below from asp language to asp.net??? thanks in advance..
1. Sub successLogin Session("UserName") = "ok" Session("Password") = "ok" Session("user_login_name") = UserName Response.Cookies("uname") = UserName Response.Cookies("uname").Expires = DateAdd ("h", 12, Now) Session("logonattempt") = 0 Response.Redirect("main.asp") End sub 2. Sub loginFailed Response.Write"<P><B>" & Replace (reason, "\n", "<BR>") & "</B></P>" Response.Write"<P><A href=""default.asp"">Back</A></P>" Session("logonattempt") = Session("logonattempt") + 1 End sub3. Sub changePassword Response.Redirect("ChangePassword.asp") End subMikesdotnett...
All-Star
154905 Points
19866 Posts
Moderator
MVP
Re: Get Help Converting Asp to Asp.Net(VB)
Apr 13, 2012 05:17 AM|LINK
Use the built in membership provider. All the functions you need to use for managing login and so on are already there: http://msdn.microsoft.com/en-us/library/yh26yfzy.aspx
By the way, if you really want code, you need to say whether you want VB or C#.
Beginning ASP.NET Web Pages with WebMatrix | My Site | Twitter
luckystar_20...
0 Points
14 Posts
Re: Get Help Converting Asp to Asp.Net(VB)
Apr 13, 2012 06:10 AM|LINK
Thanks for ur reply! I want to convert to Asp.Net in VB.Net..