Asp.Net Web Forms Site

Creating a Web Forms Site in Visual Studio

When we open the program, we will see the Start Page. The New Project command on this page enables web application creation. Since we are going to create a website, we must click on the New – Website command from the File menu.

In the window that comes up, select the programming language we will use on the left, and the "Asp.Net Web Forms Site " option on the right , and specify where the main folder of our site will be at the bottom.

On the right, there are other options besides “ Asp.Net Web Forms Site ”. For example, we can create an empty website with the " Asp.Net Empty Web Site " option.

If we choose the " Asp.Net Web Forms Site " option, a ready-made site consisting of a few pages with certain features will be created with standard settings. Important processes such as security (membership and role), friendly url management will be implemented automatically. We can make the site our own by changing the pages in this site as we wish, or even by deleting or recreating the ones we wish.

When we press the arrow key, the website will be created and all files will be displayed in the Solution Explorer panel. Let's get to know the files and folders seen in this panel:

  • Account folder: Pages related to user accounts are located in this folder. For example, Register.aspx page will be used for new member registration and Login.aspx page will be used for member login.
  • App_Code folder : Classes, datasets etc. that we will create in this folder will be kept.
  • App_Data folder: We should put our databases in this folder. This folder is a safer folder as the download of its contents is blocked by the server.
  • Bin folder : We can install packages from the internet or from different sources to perform various tasks for our site. The assembly and configuration files of these packages are kept in the bin folder. (We can see, update, remove or find and install new packages with the Manage NuGet Packages command by right-clicking on the site name in the Solution Explorer panel.)
  • Content folder: Css style files are put in this folder.
  • Fonts folder: If there is a possibility that the fonts we use on our site are not available on the visitor's computer, these fonts are placed in the fonts folder and downloaded to the visitor's computer with the necessary css codes.
  • Scripts folder: Javascript files are kept in this folder.
  • Bundle.config file: It provides the necessary css files to be added to the pages.
  • Global.asax file: It is used to perform operations on an application basis. We can perform the desired operations when our application starts running on the server, when it closes, when an error occurs, when a new session is opened and when the session is closed. (For example, this file is used to keep the number of online users.)
  • Packages.config file : The list of installed packages, their versions and which framework version they work in are specified in this file.
  • Site.Mobile.master file: If the device used by the visitor is a phone or tablet, the pages are connected to this master page, if it is a computer, etc., it is connected to the master page named Site.master. If we do not want to use the mobile master page, we can delete this file. In this case, the Site.master file will be used regardless of the device.
  • ViewSwitcher.ascx file: Contains codes that allow the user to switch between mobile and desktop views. It is a user control file. If we don't want to use it, we can delete it.
  • Web.config file: Settings that concern the entire site can be specified in this file. There are many features available. A few of them are: debug mode, custom error page, membership-security mode settings, folder or file privileges etc…

 

What is asp.net web forms site, using web forms site, empty web site, creating website with visual studio web forms site option

EXERCISES

There are no examples related to this subject.



COMMENTS




Read 781 times.

Online Users: 488



asp-net-web-forms-site