DateTime.Now

S

Shapper

Hello,

I have this code line:

Dim ticket As FormsAuthenticationTicket = New
FormsAuthenticationTicket(1, tbusername.Text, DateTime.Now,
DateTime.Now.AddMinutes(30), True, reader.GetString(0),
FormsAuthentication.FormsCookiePath)

And I get this error:
Name 'DateTime' is not declared.

Maybe I am missing the right Imports ... ?

If yes can someone tell me which? I can't find it.

If no, what am I missing here?

Thanks,
Miguel
 
B

Brock Allen

You need the System namespace. So either change the code to "System.DateTime.Now"
or add "Imports System" to the top of the file
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,123
Latest member
Layne6498
Top