Adding New Pages In Asp.Net Application (ASP.Net 3 of 44)

ManzoorTheTrainer
12 Feb 201207:47

Summary

TLDRThis tutorial demonstrates how to add new pages to an existing web application using ASP.NET and navigate between them. It covers creating a default page, adding a new web form, and linking pages using hyperlink controls, converting text to hyperlinks, and drag-and-drop navigation. The video also explains setting a startup page to ensure the application always begins from a specified page, offering various methods to manage page transitions effectively.

Takeaways

  • 📝 The demo is about adding new pages to an existing web application and navigating between them using ASP.NET features.
  • 🔨 It starts with creating a default page and adding a message to it, saving the changes.
  • 🚀 Demonstrates adding a new page by right-clicking the project, selecting 'Add New Item', and choosing a Web Form named 'my page'.
  • 🔗 Shows how to link the default page to the new page using a hyperlink control, setting its properties to navigate to 'my page'.
  • 🖌️ Explains editing the hyperlink text to 'my page' and setting the navigation URL to redirect to the new page.
  • 🔄 Describes navigating between pages by clicking on the hyperlink, which is tested in the execution.
  • 🔄 Another method of navigation is converting a text link to a hyperlink using the 'Convert to Hyperlink' icon.
  • 🔗 A third method is dragging and dropping a page from Solution Explorer to create a link directly to it.
  • 🔑 Highlights creating a button on the page and using the 'btn_my_page' click event to redirect to 'my page' with Response.Redirect.
  • 🏁 Discusses setting the default page as the startup page so that the application always begins from this page, regardless of the current page.
  • 🛠️ Concludes by emphasizing the simplicity of adding multiple pages and navigating between them using various methods in ASP.NET.

Q & A

  • What is the main topic of the video demo?

    -The main topic of the video demo is how to add new pages to an existing web application and navigate through different pages using features in ASP.NET.

  • What is the default page provided when creating a new web application in ASP.NET?

    -The default page provided when creating a new web application in ASP.NET is typically named 'Default.aspx' or 'Index.aspx'.

  • How can you add a new page to an ASP.NET web application?

    -You can add a new page to an ASP.NET web application by right-clicking on the project in Solution Explorer, selecting 'Add New Item', choosing 'Web Form', and naming it.

  • What is the purpose of the 'hl' prefix in the hyperlink property window?

    -The 'hl' prefix in the hyperlink property window is used to indicate that the hyperlink will link to a specific page, making it clear for developers what the hyperlink is intended to do.

  • How can you link one page to another using a hyperlink in ASP.NET?

    -You can link one page to another by dragging and dropping a hyperlink control, setting its properties to link to the desired page using the 'NavigateURL' property, and specifying the link text.

  • What is the alternative method to create a hyperlink to a page without using the hyperlink control?

    -An alternative method to create a hyperlink is by writing the page link directly and using the 'Convert to Hyperlink' icon to transform it into a clickable hyperlink.

  • How can you navigate to another page using an anchor tag in HTML?

    -You can navigate to another page using an anchor tag by specifying the 'href' attribute with the path to the desired page, which is created when you drag and drop the page onto the HTML editor.

  • What is the purpose of the 'btnMyPage' button in the video demo?

    -The 'btnMyPage' button is used to demonstrate how to navigate to another page when the button is clicked, by using the 'Response.Redirect' method in the button's click event handler.

  • How can you ensure that the application always starts from the default page?

    -You can ensure that the application always starts from the default page by right-clicking the default page in Solution Explorer and selecting 'Set as Start Page'.

  • What happens when you set a page as the startup page in an ASP.NET application?

    -When you set a page as the startup page, the application will always navigate to this page when it is executed, regardless of which page you were on when you stopped the execution.

  • How can you add a button to navigate to a specific page on a click event in ASP.NET?

    -You can add a button to navigate to a specific page by dragging and dropping a button control onto the page, writing the navigation code in the button's click event handler using 'Response.Redirect', and setting the button's text.

Outlines

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Mindmap

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Keywords

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Highlights

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Transcripts

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now
Rate This

5.0 / 5 (0 votes)

Related Tags
ASP.NETWeb DevelopmentPage NavigationWeb FormsHyperlinkButton ClickDefault PageCode BehindSolution ExplorerWeb ApplicationTutorial