How to add ASP.NET Web Pages to a Web Site?


Add ASP.NET Web Pages to a Web Site

Add an existing ASP.NET Web page to a Web site project

Changing the Name of ASP.NET Web Pages

Follow below solution:

If you want to add new and existing webpages to a website so you can.Some information about creating an website.

To add new webpage to a website:

Step:1-See in right side solution explorer.

Step:2-Right click on project name -> Add new item.

Step:3-In the Add New Item dialog box, under Visual Studio installed templates, click Web Form.

Step:4-Look like this below:Click below image

Step:5-See in language list and select programming language what you want.

Step:6-Give your webpage name.

Step:7-If you want the code for the page to be in a separate file,be sure that the Place code in separate file check box is selected.

Step:8-Click Add button.

Step:9-The new ASP.NET Web page is created and displayed in the Visual Web Developer.

Note:-You can create pages with different programming languages in the same Web site.

To add an existing web page to a web site project

Step:1-See in right side solution explorer.

Step:2-Right click on project name -> Add Existing Item.

Step:3-Then select your webpage and click Add.

Step:4-The ASP.NET Web page is added to the Web site project.

Note:-When you add an existing file to a Web site, the file is copied to your project not
added by reference.if you change the file in your project, the original file is left unchanged.

Changing the name of web Pages.

After creating a new ASP.NET Web page or adding an existing page to a Web site project,
you might want to change the name of the page file. You can easily rename pages in Solution Explorer.
Step:1-In Solution Explorer, right-click the file that you want to change and then click Rename.

Step:2-Type the new file name what you want and then press ENTER.


About the Author