What is equivalent for below code in VB.NET
new FormsAuthentication().SetAuthCookie(user.UserId, true, ticketData);
Ref : http://blog.tatham.oddie.com.au/2011/04/04/released-formsauthenticationextensions
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If it were legal, the equivalent code in VB.NET would be the following (note the
Callin the beginning — that’s the magical part that makes this work):Another option would be use
With:But as Darin has said,
SetAuthCookie()is a static method and should be called as such.