473,385 Members | 1,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Master page question

Hi

Is it possible switch between conten page programmatically without lose the
control's state in the master page ?

Jan 30 '07 #1
4 1377
"Vincenzo Milazzo" <vi**************@gmail.comwrote in message
news:5A**********************************@microsof t.com...
Is it possible switch between conten page programmatically without lose
the control's state in the master page ?
MasterPages don't work like framesets - they are UserControls.

To change the content, you simply redirect to another content page.
Jan 30 '07 #2
The concept of master-content pages is not like frames where you have a page
made out of two different parts and you can replace one part in runtime
while keeping the other. Master and content pages rather make up one single
page. If you need another content, you need to switch to another page. It
doesn't mean you can't keep the control state from the first page. You just
need to persist it in a regular way, e.g. in session variables.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Vincenzo Milazzo" <vi**************@gmail.comwrote in message
news:5A**********************************@microsof t.com...
Hi

Is it possible switch between conten page programmatically without lose
the control's state in the master page ?

Jan 30 '07 #3
ok, thanks for reply.

insted of session, already I had thought, is it possible to use ajax with
master page to solve my problem ?

"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:uT****************@TK2MSFTNGP06.phx.gbl...
The concept of master-content pages is not like frames where you have a
page made out of two different parts and you can replace one part in
runtime while keeping the other. Master and content pages rather make up
one single page. If you need another content, you need to switch to
another page. It doesn't mean you can't keep the control state from the
first page. You just need to persist it in a regular way, e.g. in session
variables.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Vincenzo Milazzo" <vi**************@gmail.comwrote in message
news:5A**********************************@microsof t.com...
>Hi

Is it possible switch between conten page programmatically without lose
the control's state in the master page ?

Jan 30 '07 #4
"Vincenzo Milazzo" <vi**************@gmail.comwrote in message
news:uw**************@TK2MSFTNGP06.phx.gbl...
insted of session, already I had thought, is it possible to use ajax with
master page to solve my problem ?
Probably. Ajax uses callbacks instead of postbacks, so if your content page
only initiates callbacks, then the entire page will not get rerendered every
time - therefore, any state you preserve in your MasterPage will remain...
Jan 30 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: Alan Silver | last post by:
Hello, In classic ASP, I used to use two include files on each page, one before and one after the main content, to provide a consistent layout across a web site. That way I could just change the...
1
by: Fred Nelson | last post by:
I have a question regarding page caching in a C# Web App that I'm developing. I have used page caching successfully in VS2003 at the page level - and it also works the same in VS2005. I have...
13
by: Michael | last post by:
I have setup a public variable in the Master Page "code-behind-file". Now I would like to set that value from the UserControl, but I can't seem to find a way to do this. Does anyone have any ideas?...
5
by: Kevin | last post by:
We currently have a 1.1 class library which houses the look and feel of our website by creating the html form dynamically in a base class. We then distribute our assembly to other application...
4
by: Boris Yeltsin | last post by:
OK, on my Master Page I have a control: <a id="hypTabAccount" href="#" runat="server">Account</a> Now, in the code-behind (Root.master.vb) I can refer to it simply thus: ...
2
by: n# | last post by:
I have an old existing website with a Header/ Left Hand Menu and a iframe as the main body content, adjacent to the menu. So for every click on the menu item, I used to load a aspx page on the...
4
by: lichaoir | last post by:
I have two questions about the use of Master Page: 1. How to access properties and controls in the master page from content page? (I know I can use the "FindControl()" method of the "Master"...
0
by: KingKong07 | last post by:
Hi! I have a problem with publishing my solution. I use “Use fixed naming and single page assemblies” to publish. So I just can update one and one file, this works fine, but today I had to update...
5
by: Murray | last post by:
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...
6
by: Mickey | last post by:
Coming from a Dreamweaver/ASP/PHP background. Planning to use Visual Studio 2008 for a website. Complete newbie question here (please be gentle!): Do master pages work similar to Dreamweaver...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.