7.3. Adding Pages to a Project

We can add a new Web Forms page to our project through the Add Web Form or Add New Item menu item under Project. (There is an Add New Item icon as well.) By default, each new page is called WebFormi.aspx, where i is a digit. This is why our second NorthWind page is called WebForm2.aspx.

By default, the first Web Forms page of the project is treated as the project start page. We can specify an alternative start page by setting the start-up page property of the project. To do this, click on the Properties menu item under Project. A Property Pages window displays as pictured in Figure 7.2. Enter the name of the page you wish to have displayed at start-up. (Note that you'll need to explicitly override the default for each configuration property—for example, both the Debug and Release configurations.)

Figure 7.2. Changing the Project Start-up Page


For example, if we wished to add a first page asking the user for a login name and password, we would add the new Web Forms page to the project, design it, and then change the start-up page entry to use that page.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.220.92