p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning ASP.NET 4 : in C# and VB (http://p2p.wrox.com/forumdisplay.php?f=560)
-   -   First ASP.NET 4 Web Site (http://p2p.wrox.com/showthread.php?t=99051)

c0d3w1thw1ng3 June 21st, 2016 09:28 PM

First ASP.NET 4 Web Site
 
I cannot find the "ASP.NET Web Site" option when creating a "New Web Site...". I selected the "ASP.NET Web Site (Razor v3)" option, but the <%= DateTime.Now.ToString() %> line does not run, it just prints it on the screen.

Any suggestions would be appreciated.

Imar June 22nd, 2016 08:05 AM

Which version of Visual Studio are you using? (Check Help | About Microsoft Visual Studio).

And are you sure you picked File | New Web site and not File | New Project?

Imar

c0d3w1thw1ng3 June 22nd, 2016 08:15 AM

Microsoft Visual Studio Community 2015
Version 14.0.25123.00 Update 2

I also had the same problem on:

Microsoft Visual Studio Express 2015 for Web
Version 14.0.25123.00 Update 2

I did not choose the project. I did File | New Web site

Imar June 22nd, 2016 08:41 AM

A lot has changed between .NET 4 in 2010 (which this book targets) and VS 2015. I think you either may want to get an updated version of this book (my 4.5.1 version targets 2013), or install VS 2010, or be prepared for *lots* of changes between the different versions of VS.

When I choose File | New Website in 2015, I see:

ASP.NET Empty Web Site
ASP.NET Web Forms Site
ASP.NET Web Site (Razor v3)

Depending on the exercise you're working on you need to choose the first (completely empty) or second (which already has a bunch of stuff in it).

Hope this helps,

Imar


All times are GMT -4. The time now is 03:09 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.