473,569 Members | 2,542 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1628
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: AcYMAJ597rPJ8bI yRcOgjTCM9PjaFg ==
| X-WBNR-Posting-Host: 199.91.33.254
| From: "=?Utf-8?B?Q293Ym95ICh HcmVnb3J5IEEuIE JlYW1lcikgLSBNV lA=?="
<No************ @comcast.netNoS pamM>
| References: <C0************ *************** *******@microso ft.com>
| Subject: RE: menu on materpage
| Date: Wed, 28 Dec 2005 14:47:02 -0800
| Lines: 29
| Message-ID: <71************ *************** *******@microso ft.com>
| 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.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGXA03.phx .gbl
| Xref: TK2MSFTNGXA02.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:3674 22
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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: AcYMAJ597rPJ8bI yRcOgjTCM9PjaFg ==
| X-WBNR-Posting-Host: 199.91.33.254
| From: "=?Utf-8?B?Q293Ym95ICh HcmVnb3J5IEEuIE JlYW1lcikgLSBNV lA=?="
<No************ @comcast.netNoS pamM>
| References: <C0************ *************** *******@microso ft.com>
| Subject: RE: menu on materpage
| Date: Wed, 28 Dec 2005 14:47:02 -0800
| Lines: 29
| Message-ID: <71************ *************** *******@microso ft.com>
| 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.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGXA03.phx .gbl
| Xref: TK2MSFTNGXA02.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:3674 22
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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: AcYMVoh4BawZ8WS NS/G7WO6wLpteFA==
| X-WBNR-Posting-Host: 84.195.200.73
| From: "=?Utf-8?B?QmFydA==?=" <ba*****@commun ity.nospam>
| References: <C0************ *************** *******@microso ft.com>
<71************ *************** *******@microso ft.com>
<8i************ **@TK2MSFTNGXA0 2.phx.gbl>
| Subject: RE: menu on materpage
| Date: Thu, 29 Dec 2005 01:02:02 -0800
| Lines: 97
| Message-ID: <2E************ *************** *******@microso ft.com>
| 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.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GXA03.phx.gbl
| Xref: TK2MSFTNGXA02.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:3674 98
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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: AcYMAJ597rPJ8bI yRcOgjTCM9PjaFg ==
| > | X-WBNR-Posting-Host: 199.91.33.254
| > | From: "=?Utf-8?B?Q293Ym95ICh HcmVnb3J5IEEuIE JlYW1lcikgLSBNV lA=?="
| > <No************ @comcast.netNoS pamM>
| > | References: <C0************ *************** *******@microso ft.com>
| > | Subject: RE: menu on materpage
| > | Date: Wed, 28 Dec 2005 14:47:02 -0800
| > | Lines: 29
| > | Message-ID: <71************ *************** *******@microso ft.com>
| > | 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.publi c.dotnet.framew ork.aspnet
| > | NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.2.250
| > | Path: TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGXA03.phx .gbl
| > | Xref: TK2MSFTNGXA02.p hx.gbl
| > microsoft.publi c.dotnet.framew ork.aspnet:3674 22
| > | X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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
8466
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 | 3 | 1 | SubMenu 1 of menu 1
1
2477
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 post. In this post I want to ask you why my code behaves differently in IE, while it behaves like I expect in Mozilla and Opera. What I would like to...
2
3868
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 http://home.pacific.net.sg/~jacksony ? (the drop down bar could not work at www.apchosting.net but can drop at home.pacific.net.sg. I suspect it is a server problem but was told it...
1
2154
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, I did not want to try to modify the code without a little help. When you place the mouse over the menu bar, this script calls the function to show...
4
9278
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 if it works, and if it does not, tell me why it does not work. Thanks.
0
7924
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8125
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1221
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.