visual studio no asp.net possibility - asp.net

so i just installed microsoft visual studio express 2012 for windows 8 (virtual machine) and i noticed there is no option of creating .asp files
normally, i should be able to file -> new web site, c#, empty. And then add a new web form to create an aspx file, but i dont get these options.
i only get file -> new project which creates javascript (javascript) or XAML files (visual basic, visual C#, visual C++)
i assume there is something wrong with installation. i tried installing ASP.NET from the asp.net website but doesnt change anything.
please hold in mind i am a beginner,
any help is much appreciated

You need this one; sounds like you downloaded the WPF version http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-for-web

You must install the web version to do asp.net.
Check this MSDN

Related

Import existing asp.net website on Visual Studio for mac

I'm working as frontend developer in a company which uses asp.net for its website. I usually work on mac and I need to setup my localhost to work on the website, but something's wrong with the project. They provided me the folder with all the files (aspx, aspx.cs, dll etc), and I'm supposed to build my own solution file. Visual Studio for macOS doesn't give me the possibility to create an empty website project (VS for pc does), or maybe I'm selecting the wrong entry. What am I supposed to do?
I tried to select Empty ASP.NET Web project, but It doesn't work, all the vars and methods from aspx pages are not detected in aspx.cs. Same with Web Form. I can't set up anything and the solution is not working.
Everyone at the company uses Windows and they can't help me.
What I have to do to import it in the right way?
I'd like to use VS Code if it's possible. This is the first time with asp.net.
Thanks in advance
The main thing is that ASP.NET Web Forms is obsolete. I guess they stopped to support such type of solution a long time ago, only critical crushes. If you really want to use mac for ASP.NET Web Forms you should install Parallels VM with Windows 10 and Visual Studio on board.

how do I find out if I have asp.net CORE

I have been asked to update my Visual Studio with asp.net core. But the update told me I already have this component. However when I look in the list for New Project I can find nothing which includes the word CORE.
How do I work this out?
I'm not talking about a single Visual Studio Project or File. I'm talking about the whole program. I have to update the program.
You need to download Tooling Preview 2 to get the asp.net core templates. That is a bug in the visual studio 2015. Please follow the following steps to resolve this issue
This is what your add new project dialog will look like once you have .net core installed correctly. Were you able to resolve this?
Is it a console app or a web app? If you have a .xproj file in your Visual Studio project, then you have ASP.NET Core web application. Probably the same for an ASP.NET Core console application.

Friendly URLs with WebMatrix and razor

I'm new to ASP.NET and I'm learning first in WebMatrix using razor syntax.
In PHP I used .htaccess to route URLs to database posts, for example:
http://mywebsite.com/linux/how-to-install-wamp-in-ubuntu-12.04
In that case routes to file:
http://mywebsite.com/routes.php?title=how-to-install-wamp-in-ubuntu-12.04
I'm trying to route like the PHP example:
http://mywebsite.com/routes.cshtml?title=how-to-install-wamp-in-ubuntu-12.04
Can I do it in ASP.NET with WebMatrix and razor?
I know how I can take GET data in ASP.NET, but I don't understand how I can make a friendly URL and how I can route to "routes.cshtml" when the page isn't found.
There is an existing package specifically for ASP.NET Web Pages that lets you do what you want and it is available via the WebMatrix Package Manager. It is called Routing For Web Pages. I have written an article on how to use it: http://www.mikesdotnetting.com/Article/187/More-Flexible-Routing-For-ASP.NET-Web-Pages
Details: Microsoft is now making this very easy to do for ASP.NET Via a Nuget Package. Unfortunately, this package "Microsoft.AspNet.FriendlyUrls" is currently in Pre-Release and WebMatrix doesn't allow you to download Pre-Releases. As a result, following my way of doing it might not be as easy compared to if you just had Visual studio or VS Express.
My suggestion is to download Visual Studio Express 2012 and either use that for developing or just use it so you can get Nuget Packages.
Ill assume that you want to develop in WebMatrix.
Solution:
Download and Install Visual Studio Express 2012.
Create a new Website
In solution Explorer, right click on your Website and select "Manage Nuget Packages.."
Press the drop down that says "Stable Only" and choose "Include Prerelease"
In the search box enter "Microsoft.AspNet.FriendlyUrls"
Select "Install"
Open your project in Windows Explorer so you can see all the files.
Copy the folders "App_Code" and "bin" into your WebMatrix Project (e.g. Add them to your solution).
Add a Global Application Class "Global.asax"
In the Application_Start method add the following line
RouteConfig.RegisterRoutes(System.Web.Routing.RouteTable.Routes);
You will now have FriendlyURL's
I know this seems like a lot of work but if you had Visual Studio or WebMatrix allowed Pre-Released then it would be very easy to follow.
Warning: If you do decide to develop it in Visual studio delete the following files as the Mobile part of it doesn't work currently (Hence why it is Pre-Release)
Site.Mobile.Master
LiSite.Mobile.Master.designer.cs
ViewSwitcher.ascx
ViewSwitcher.ascx.designer.cs
Future: In the near future there will be release version of FriendlyUrl's and then you will be able to get it from Nuget in WebMatrix much more easier.
Links To More Information:
Information on Microsoft's Friendly Url Package
Information on how to use Nuget in WebMatrix
of course you can, it is called URL Rewriting
http://developer.mindtouch.com/en/kb/Installing_MindTouch_Core_on_Windows_%28IIS%29/Rewrite_web.config_for_IIS7
or here
http://www.phpgenious.com/2010/04/url-rewriting-with-php-and-iis-7/
or google for more info

If I build a web application in ASP.NET, am I married to Visual Studio?

Doesn't Visual Studio generate all kinds of things when you build asp.net websites? I haven't used it in a while but back in webforms with a the dal and a bll, VS generated xml files and other things (don't remember what). And, while I technically could use notepad to fix it, VS seemed to be the only way to make sure things worked right.
How about today with MVC or something else asp.net? Am I tied to Visual Studio forever if I want to build websites? I liked in PHP that I can open up a file and it be simple to change things and it just works.
I am not knocking Visual Studio. It is a great product, but for those in my group that do not use it, it is a learning curve. Not asking for why asp.net is better than php or vice versa, just about visual studio.
EDIT: Is Visual Studio the BEST way to build asp.net projects?
You can use MonoDevelop, Webmatrix, Visual Studio Express but i suggest SharpDevelop, its open source.
sharpDevelop (short for SharpDevelop) is a free IDE for C#, VB.NET and Boo projects on Microsoft's .NET platform. It is open-source, and you can download both sourcecode and executables from this site. In addition, you can find the latest information and changes on #develop, as well as get in touch with the team in the forum.
More Information
SharpDevelop Website
MonoDevelop
Webmatrix
Visual Studio Express
No, you can build with MSBuild from command line, just simple msbuild.exe app.sln
You can also use MonoDevelop, which will run on Windows/Mac/Linux.
You could use Microsoft WebMatrix, which is free and aims to simplify the web development process. Another alternative is MonoDevelop, which is an open source IDE for multiple platforms.

Create classic asp project in Visual Studio 2010 from scratch

I have always developed on ASP.NET on 2.0 and higher .NET framework.
I am trying to create a website in classic ASP from scratch using VS2010 and can't figure out how to do that.
Thanks
Create a new folder
Open Visual Studio
Choose "File" -> "Open web site"
Go to the recently created folder
Then right click -> Add New item
Select "HTML File"
Rename the file as .ASP
Create a new web site or virtual directory in IIS and point to the folder
Profit!
(alternatively to 8, you can use the new IIS Express that supports ASP Classic)
As you probably know, classic asp has nothing to do with .NET. There is no type of project in VS 2010 (or any Visual Studion .NET) for classic asp sites. If you want to use VS2010 you can simply create text file with the extension .asp and start typing away.
You can use any text editor for the job. My favorites are primal script (greatest intellisense I have found for classic asp) and Notepad++
You donĀ“t have to compile anything since asp is scripting language and will be interpreted each time.
So just start creating text files with asp endings and fire away.
If you want to use something for classic ASP from/supported by Microsoft then you should consider Web Matrix which includes IIS Express and is a free download.
It does require ASP.net 4.0 if not already installed.

Resources