473,396 Members | 2,055 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,396 software developers and data experts.

menu on materpage

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
Dec 28 '05 #1
4 1614
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

Dec 28 '05 #2
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
|

Dec 29 '05 #3
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
|

Dec 29 '05 #4
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
| > |
| >
| >
|

Dec 29 '05 #5

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

Similar topics

4
by: dr. zoidberg | last post by:
Hello, I'm creating simple menu. MySQL: +----+-----+----------------------+ | id | sid | Title | +----+-----+----------------------+ | 1 | 0 | Main Menu 1 | 2 | 0 | Main Menu 2 | ...
1
by: Macamba | last post by:
Hi all, I am currently developing a website for a voluntary organisation. It is my first step in website development. The dynamic menu I developed has some bugs, which I addressed in another...
2
by: Jackson Yap | last post by:
can someone kind enough to help me look at the attached html and js file? Why is it that the javascript menu could not work at www.apchosting.net but could work at...
1
by: Anthony | last post by:
Below is a script I found at http://javascript.internet.com/ for a cascading menu. The script works great but there is one thing that I would like modified. BecauseI am just learning javascript,...
4
by: TycoonUK | last post by:
Hi, As I do not have IE7 on my computer, I was wondering if there is a fault in my CSS Menu when using IE7. Please can someone look at my site - http://www.worldofmonopoly.co.uk and tell me...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.