Reputation: 6492
I have just started learning ASP.NET. While going through a few tutorials I came across this example- http://www.w3schools.com/aspnet/showfile_c.asp?filename=try_webpages_cs_001 When I wrote the same code in visual studio 2012, I am not getting the output as mentioned in the tutorial, instead the output is
The time is @DateTime.Now
What am I doing wrong here? I am completely new to ASP.NET and don't have even slightest idea of the language, although I know a bit of C# and Python.
Upvotes: 0
Views: 56
Reputation: 16743
Can you try:
The time is <%=DateTime.Now %>
That should write the timestamp into the response.
Upvotes: 1