Thanks for your quick response Bart,
Yes, that's just what I meant. Also, I agree that put the code in Master
Page's Page_load is better since we just need to maintain the code in the
central place....
Regards,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: menu on materpage
| thread-index: AcYMVoh4BawZ8WSNS/G7WO6wLpteFA==
| X-WBNR-Posting-Host: 84.195.200.73
| From: "=?Utf-8?B?QmFydA==?=" <ba*****@community.nospam>
| References: <C0**********************************@microsoft.co m>
<71**********************************@microsoft.co m>
<8i**************@TK2MSFTNGXA02.phx.gbl>
| Subject: RE: menu on materpage
| Date: Thu, 29 Dec 2005 01:02:02 -0800
| Lines: 97
| Message-ID: <2E**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:367498
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Thanks Steven,
|
| I did it with a session state variable that I set in the page_load event
on
| every page. In the page_load event of the masterpage I call the session
state
| variable and set the menu to the coresponding selected item.
|
| Was this also the way you mentioned?
|
| Bart
|
| "Steven Cheng[MSFT]" wrote:
|
| > Hi Bart,
| >
| > As for the status lost/reset, do you mean when redirecting between two
| > pages, the original selected Status of the Menu control will lost....
If
| > so, this is the expected behavior because the Master page is created
each
| > time a concrete page is created, and every concrete page will have its
own
| > master page instance, not sharing the same ..... So when we redirect
| > between two pages using the same Master Page, the control status info
in
| > the Master page part won't persist since they're two different
pages....
| > If you need to persist some page logic or status info between such
| > redirection, you can consider using some additional variables to store
such
| > info. For example, we can use SessionState to store the currently
selected
| > MenuItem and when a page is loaded, we can set the correct menu item's
| > selected status according to the value....
| >
| > Regards,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure!
www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| > --------------------
| > | Thread-Topic: menu on materpage
| > | thread-index: AcYMAJ597rPJ8bIyRcOgjTCM9PjaFg==
| > | X-WBNR-Posting-Host: 199.91.33.254
| > | From: "=?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBNVlA=?= "
| > <No************@comcast.netNoSpamM>
| > | References: <C0**********************************@microsoft.co m>
| > | Subject: RE: menu on materpage
| > | Date: Wed, 28 Dec 2005 14:47:02 -0800
| > | Lines: 29
| > | Message-ID: <71**********************************@microsoft.co m>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:367422
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | What do you mean when you say "the state is reset"?
| > |
| > | Application reboots? Abnormal
| > | User gets new session? Abnormal
| > | Page resets? Normal
| > |
| > | Without understanding what you mean by state, I am shooting fish in
the
| > | dark. :-)
| > |
| > | --
| > | Gregory A. Beamer
| > | MVP; MCP: +I, SE, SD, DBA
| > |
| > | ***************************
| > | Think Outside the Box!
| > | ***************************
| > |
| > |
| > | "Bart" wrote:
| > |
| > | > Hi,
| > | >
| > | > I have a menu on my master page.
| > | > When I click on a menu item the state is reset after the page is
| > redirected
| > | > to the NavigateURL.
| > | > How can fix this?
| > | >
| > | > Thanks
| > | > Bart
| > |
| >
| >
|