• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 151
  • Last Modified:

Launch page from another page

I created a Master page with two content holder.
One will be used for the tree view. Another for the different pages.
When i link to the second page, how could i load the first content page? What is the syntex?
0
iyufa
Asked:
iyufa
  • 3
  • 3
1 Solution
 
Göran AnderssonCommented:
A master page doesn't work that way. Each content page contains all the contents for the content holders in the master page.

If you want the tree view in all pages, put it in the master page, or put it in a user control that you can reuse in several content pages.
0
 
iyufaAuthor Commented:
i got this request from my Busness  Analyst. So you are saying that I cann't do that?
0
 
Göran AnderssonCommented:
Exactly. You can't do that. The request is based on a false assumption.

If the master page would be the base, and the content page was included in the master page, you could do that, but that is not the case. The content page is the base, and the master page is is included as a template for the content page. A master page can actually itself have another master page as template.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
iyufaAuthor Commented:
Let's start over.
I created A Master page one with one Content Page (contain the list of the menu and details)
Also I created a Master Page2 with two Content Pages.
Content holder1  will be a place for the different pages. ex. GMM.aspx
Content Holder2 will be a place for the tree view ex TreeView.aspx
My default page will be a Master page one. Then when i click on one of the menu selection it should load a page GMM.aspx And inside of this page i want to do a          Response.Redirect("\TreeView.aspx")
Can i do that?
As a result I am expecting  both of my  pages (from both content pages to be load)
Can i do that?



0
 
Göran AnderssonCommented:
No, you can't do that. You can't have two content pages in a master page.

You never browse to the master page. You always browse to the content page. The content page loads the master page as a template, and the content place holders in the master page is filled by the content elements from the content page. All content elements used in a master page comes from the same content page.

If you do a redirect, the current response is scrapped, and instead a redirection page is sent to the browser. The browser then sends a new request for the page that you specified in the redirect.

It's possible to use Server.Transfer to execute one page from another, but that is a complicated way of doing it, that requires you to output partial documents from the pages.

Just put the tree view in a user control, so that you can use it anywhere you like.
0
 
iyufaAuthor Commented:
Thank you
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now