Re: Change Content page from Master page
- From: rowe_newsgroups <rowe_email@xxxxxxxxx>
- Date: Thu, 3 Jul 2008 06:42:51 -0700 (PDT)
On Jul 3, 7:51 am, "Murray" <mdweingar...@xxxxxxxxx> wrote:
Forgive me if this question is too basic, but I'm new to ASP.NET
programming, and I can't locate a simple answer to this question.
I have a web page that consists of a Master Page and a single
contentplaceholder.
The master page has a menu bar in it.
How do I change the web page that is displayed in the contentplaceholder
when I click on a menu item on the master page?
It seems like this should be pretty basic, but I can't discover how to do
this.
Thanks for any help
First off, you never actually browse to a master page, you browser to
a page that uses a master page. With that said, your scenario is
greatly simplified. Basically if you need to switch from one page to
another, you do just what you would do if you didn't use master pages
- drop a link to that page. The most common ways of doing this are
below.
i.e.
In html:
<a href="NewPage.aspx">Transfer to a New Content Page</a>
From Server-Side Code:
Response.Redirect("NewPage.aspx")
Server.Transfer("NewPage.aspx")
What you have to remember is that master pages are there to make your
life easy. If all your pages share a common template, such as a header
banner and a footer copyright notice, you can put it in your master
page and not have to worry about it at the page level.
Thanks,
Seth Rowe [MVP]
http://sethrowe.blogspot.com/
.
- References:
- Change Content page from Master page
- From: Murray
- Change Content page from Master page
- Prev by Date: Re: Get text "literally" from a TextBox
- Next by Date: Re: Visual Basic .NET & named pipes
- Previous by thread: Re: Change Content page from Master page
- Next by thread: Re: Change Content page from Master page
- Index(es):
Relevant Pages
|