Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Variable scope

Reply
Thread Tools

Variable scope

 
 
Vincent V
Guest
Posts: n/a
 
      07-05-2003
What type of variable can you use that lasts between page refreshes is it
possible or do i have to use session or a hidden field

thanks


 
Reply With Quote
 
 
 
 
dave wanta
Guest
Posts: n/a
 
      07-05-2003
you could use a public static property on a class,
or
Application[]
or
Cache[]
or
Session[]

hth,
Dave
www.aspNetEmail.com



"Vincent V" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> What type of variable can you use that lasts between page refreshes is it
> possible or do i have to use session or a hidden field
>
> thanks
>
>



 
Reply With Quote
 
 
 
 
George Zacharias
Guest
Posts: n/a
 
      07-05-2003
You can also try Viewstate["yourkey"] = "value" if you have viewstate
enabled.

George Zacharias.

"Vincent V" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> What type of variable can you use that lasts between page refreshes is it
> possible or do i have to use session or a hidden field
>
> thanks
>
>



 
Reply With Quote
 
Steve C. Orr, MCSD
Guest
Posts: n/a
 
      07-05-2003
Normally you'd use Session state, or Viewstate, or the Application object,
or the Cache object, or Cookies. A hidden field could also work. They all
have their trade offs.

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net


"Vincent V" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> What type of variable can you use that lasts between page refreshes is it
> possible or do i have to use session or a hidden field
>
> thanks
>
>



 
Reply With Quote
 
David Waz...
Guest
Posts: n/a
 
      07-06-2003
Vincent,

it's called "buy a basic book on asp/aspx"
or read the included on-line documentation. Some questions are just so
basic that IMHO they don't belong here.


"Vincent V" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> What type of variable can you use that lasts between page refreshes is it
> possible or do i have to use session or a hidden field
>
> thanks
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Having trouble understanding function scope and variable scope Andrew Falanga Javascript 2 11-22-2008 09:23 PM
Scope - do I need two identical classes, each with different scope? ann Java 13 09-13-2005 03:07 AM
How do namespace scope and class scope differ? Steven T. Hatton C++ 9 07-19-2005 06:07 PM
IMPORT STATIC; Why is "import static" file scope? Why not class scope? Paul Opal Java 12 10-10-2004 11:01 PM
How do I scope a variable if the variable name contains a variable? David Filmer Perl Misc 19 05-21-2004 03:55 PM



Advertisments