Solved

Launch page from another page

Posted on 2007-12-03
8
140 Views
Last Modified: 2010-04-06
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
Comment
Question by:iyufa
  • 3
  • 3
8 Comments
 
LVL 29

Expert Comment

by:Göran Andersson
ID: 20397366
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
 

Author Comment

by:iyufa
ID: 20397881
i got this request from my Busness  Analyst. So you are saying that I cann't do that?
0
 
LVL 29

Expert Comment

by:Göran Andersson
ID: 20398192
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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

Author Comment

by:iyufa
ID: 20398300
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
 
LVL 29

Accepted Solution

by:
Göran Andersson earned 500 total points
ID: 20398500
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
 

Author Comment

by:iyufa
ID: 20398525
Thank you
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20561754
Forced accept.

Computer101
EE Admin
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design.  These principles do not stand alone; there is interplay among them.  And they are not laws, merely princ…
It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now