Re: MasterPages - Dynamically Created Menus Disappearing

Tech-Archive recommends: Fix windows errors by optimizing your registry



"BillE" <belgie@xxxxxxxxxxx> wrote in message
news:uQO6q%23t9GHA.4708@xxxxxxxxxxxxxxxxxxxxxxx

I think if you use NavigateURL it is not a postback so what you add to
viewstate is gone.

Well obviously - I think that's the fundamental issue that the OP can't
quite grasp...

I use the SelectedNodeChanged event of the treeview to load the value I
want into a temporary session variable. Then I call Response.Redirect to
open the content page. The content page retrieves the temporary session
variable.

Session variables, Bill? Surely not! What if the user does a Ctrl-N...? ;-)

I have a function in my master page to load my treeview. I can call this
function in the master page from the content page when it loads. It
passes the value it retrieved from the session variable to the function in
the master page.

Absolutely!

This is the way I do it, and it works fine. If there's a better way I
hope somebody posts it.

I wouldn't personnaly use Session for this - I'd have properties in the
class behind the MasterPage whose values would be set by the ContentPage -
but the effect is the same...


.



Relevant Pages

  • Re: MasterPages - Dynamically Created Menus Disappearing
    ... The content page retrieves the temporary session ... Session variables, Bill? ... function in the master page from the content page when it loads. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How do I? Stupid newbie question Im sure...
    ... but the problem is that the value of the control ís changed using javascript. ... Can you access session variables from javascript? ... using javascript depending on whether or not the submenu is expanded or not. ... I've placed a hidden text field on the master page in which I record the div ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Change *.css on the fly at the server???
    ... this page (code actually from the master) and set a session variable. ... but it will require a round-trip to the server because you can only set / retrieve session variables server-side... ... Mark Rae ...
    (microsoft.public.dotnet.framework.aspnet)