Search code examples
asp.netvb.netvisual-studio-2017

How to add multiple website project icon in solution


I was assigned project which language is vb.net. I take a lot of time to find answer but still not

  1. How to add like this in solution ?
  2. What is this and why must use like this ?enter image description here

Solution

  • This is pretty basic Visual Studio functionality so I'm concerned that you really haven't bothered to learn the fundamentals of VS development to be asking this question. I decided that the question was specific enough to warrant an answer but I really do recommend that you do some reading on the basics of web development in VS to get a better understanding of how the IDE is used.

    In your screenshot, it shows the Solution Explorer window, which is a way to manage your development projects. The top level is the solution, which is a container for one or more projects and other items relevant to those projects. For instance, you might have an application that is made up of a web site and a mobile application that share functionality. In that case, you might have one project for the common library, one project for the web site and one project for the mobile application.

    VS makes a distinction between web sites and web applications. They both result in HTML being displayed in the user's browser but web sites are basically just pages on a server that sent to the browser as is while web applications are code that gets executed on a server to generate HTML that gets sent to the browser. Based on the icons, it looks like your solution contains web sites. These days, web sites should be avoided for all but the simplest cases and web applications should be preferred.

    I'm not sure about VS2017 but I think that VS2019 can't even create new web sites. You definitely can add an existing web site though, so you can import one to a new solution from an existing solution. In VS, you can right-click the solution node in the Solution Explorer to add a new project or existing project or web site, or you can use the File item on the Main menu.

    EDIT:

    I just checked VS2017 and if you select File -> New -> Project from the main menu, you can then select Installed -> Visual Basic -> Web -> Previous Versions in the New Project dialogue and add a web site. The descriptions of the project templates specify that no project file is created. The fact that it is under Previous Versions indicates that they considered it to be on the way out even then.