answersLogoWhite

0


Best Answer
Creating a Multiform Web ProjectAs in Windows applications, you can add multiple forms to a Web application. To see how this works, I'll create a new example here, called Multiform on the CD-ROM. This example will put to work a few Web server controls we'll see in the following chapters, but whose use is very like what we've seen with Windows controls. In the main form, WebForm1, I add a Web server label control with the text "Web Form 1", Next, add two hyperlink controls with the HyperLink tool in the toolbox. Set the text of HyperLink1 to "Web form 2" and the text of HyperLink2 to "See HTML Page 1",

: Starting a multiform Web application.

Now we can add a new Web form to the project-just select the Project|Add Web Form menu item and click Open in the Add New Item dialog box that appears. This adds WebForm2 to the project (just as we might have added Form2 to a Windows project). Besides Web forms, you also can add simple HTML pages to our project. To see how that works, select the Project|Add HTML Page menu item and click Open, creating HTMLPage1 and adding it to our project.

All that's left is to navigate to the new Web form and HTML page when the user clicks the corresponding hyperlink. To connect HyperLink1 to WebForm2, select HyperLink1 and select the ellipsis ("…") button in the NavigateURL property in the Properties window to open the Select URL dialog box you see in . This dialog lists the other files in our project-select WebForm2.aspx and click OK to connect the hyperlink to WebForm2.

The Select URL dialog box.

Also, set the NavigateURL property for the second hyperlink, HyperLink1, to HTMLPage1.htm, connecting that hyperlink to the simple HTML page.

Next, you have to set the hyperlinks' target. In HTML, a link's target specifies where the data the hyperlink points to will appear, and that's especially valuable when you're working with HTML frames. If you don't set the hyperlinks' Targetproperties, WebForm2 and HTMLPage1 will appear in new browser windows when you click them. To make them appear in the same browser window as WebForm1 (so they replace WebForm1 when they appear), set the Target property of each hyperlink to "_self" in the drop-down list that appears in the Properties window for this property ("_self" is the HTML term for the current window).

When you run this example, you see the two hyperlinks, now active,

Hyperlinks for navigating to a new form.

When you click a hyperlink, such as the one to WebForm2, that new form appears in the browser as you see in Figure 14.15. (I've added a label like the one in WebForm1 to this form so we can tell what form we're looking at.)

Navigating to a new form.

In this way, we're able to support multiple forms in a Web application. (Note that we'll take a closer look at hyperlink and label controls in upcoming chapters.)

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you creating a multiform web project?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is default authentication method while creating new web application project?

Windows authentication is the default authentication method when you create a new Web application project.


Who would be responsible for creating a project management plan?

The Project Manager is responsible for creating the Project Management Plan for the project.


What is the difference between web project and traditional project?

differences between a Web Project and Traditional Project?


What is the difference between traditional project and web based project?

differences between a Web Project and Traditional Project?


Antonym of uniform?

irregular or multiform


When was Web Standards Project created?

Web Standards Project was created in 1998.


What part of the body does glioblastoma multiform affect?

Brain


What is the web address of the History Project in Boston Massachusetts?

The web address of the History Project is: http://www.historyproject.org


Where can I get a project management web?

If you are interested in web project management companies, several are available online including project.net and proworkflow.com. If you are interested in learning how to manage your own web project, you may want to purchase a book on the topic from amazon.com (such as "Web Project Management: Delivering Successful Websites").


What is the web address of the Einstein Project in Green Bay Wisconsin?

The web address of the Einstein Project is: http://www.einsteinproject.org


What is the web address of the Drinking Gourd Project in Concord Massachusetts?

The web address of the Drinking Gourd Project is: www.drinkinggourdproject.org


Can you use visual studio for asp?

Yes! When creating a new project select "ASP.Net Web Application" from the New Project dialog box. This option provides the familiar ASP language combined with the power of the different supported Visual Studio languages.