Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to use DateTime.now in Visual Studio 2010

Posted on 2011-10-07
4
Medium Priority
?
517 Views
Last Modified: 2012-05-12
Using VS10 & ASP.NET 3.5

It doesn't like me to use....
    dim dt as DateTime = DateTime.now     <--- no property with "now"

What's that about ???
0
Comment
Question by:MikeCombe
  • 3
4 Comments
 
LVL 7

Expert Comment

by:Bill Nolan
ID: 36934502
"now" should be "Now".
0
 

Author Comment

by:MikeCombe
ID: 36934573
I agree....that was my typo.
However....that is not the issue

In an ASPX file it works as expected.
In an ASMX file it does NOT work.
VS10 acts like it doesn't understand it.
I have "Imports System in my ASMX file.
What is missing ?

0
 

Accepted Solution

by:
MikeCombe earned 0 total points
ID: 36934729
problem solved.....right click in VS10, selected a pop-up setting & now it works.
go figure.
0
 

Author Closing Comment

by:MikeCombe
ID: 36954329
as stated
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question