Persisting State - Without using session vars 
Author Message
 Persisting State - Without using session vars

Hi,

I have an admin button that I only want to display on a login page if the
user logs in as 'admin'.

However, once logged in as admin I want the administrator to have access to
an admin button at all times.

I haven't been able to find a way to persist the value of the visible
property for the button if the administrator returns to the login page,
other than using a session variable (which I want to avoid).

I thought that viewstate may provide an answer, but I do not understand how
to access values of existing controls in viewstate. The code example in
VS.Net appears to explain how to add new properties to viewstate, but not
how to access existing properties of controls through viewstate.

Maybe I'm stuck with the session variable?

Thanks in advance,

Rgd,

Phil



Mon, 13 Dec 2004 22:27:09 GMT  
 Persisting State - Without using session vars
Please post asp.net related questions to the specialized NG (microsoft.public.dotnet.framework.aspnet)

Willy.

Quote:

> Hi,

> I have an admin button that I only want to display on a login page if the
> user logs in as 'admin'.

> However, once logged in as admin I want the administrator to have access to
> an admin button at all times.

> I haven't been able to find a way to persist the value of the visible
> property for the button if the administrator returns to the login page,
> other than using a session variable (which I want to avoid).

> I thought that viewstate may provide an answer, but I do not understand how
> to access values of existing controls in viewstate. The code example in
> VS.Net appears to explain how to add new properties to viewstate, but not
> how to access existing properties of controls through viewstate.

> Maybe I'm stuck with the session variable?

> Thanks in advance,

> Rgd,

> Phil



Tue, 14 Dec 2004 02:21:43 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. State Machine in C without using GOTO ???

2. Session state

3. HTTP Session State Objects

4. Storing a Dataset into a Session State variable in ASP.NET

5. Web services: troubles with Session state

6. SQLServer Session State and anonymous web access

7. Casting from the session state

8. Accessing Session State outside of ASP.NET

9. global vars vs: local vars

10. How do i persist binary data(Picture) using IPersistPropertyBag

11. Correct way to use Document object when not persisting using Serialisation

12. Using vars to access structures/functions

 

 
Powered by phpBB® Forum Software