Ask a Question related to ASP.NET General, Design and Development.
-
Vincent V #1
Variable scope
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
Vincent V Guest
-
PHP variable scope bug in CT
I have a page where I declare PHP variables which are then used inside an include file. When I try to edit the page in Contribute, I get a notice... -
[PHP-DEV][2] Variable Scope
On Sunday, Aug 31, 2003, at 06:16 America/New_York, Ard Biesheuvel wrote: Nothing; I wish to concede: If you look further down the example, you... -
[PHP-DEV][1] Variable Scope
Thank you for the first decent response. I concede. On Sunday, Aug 31, 2003, at 07:09 America/New_York, Zeev Suraski wrote: -- PHP Internals... -
[PHP-DEV] Variable Scope
Variable scope is mediocre at best. For instances: $array = array(1, 2, 3, 4, 5); for ($i = 0; $i < 5; $i++) { $num = $array; echo $num;... -
Re[2]: [PHP-DEV] Variable Scope
Hello LingWitt, - PHP is typeless - for doesn't span any declaration level and hence does not have its own symbol table - PHP is not c, not C++... -
dave wanta #2
Re: Variable scope
you could use a public static property on a class,
or
Application[]
or
Cache[]
or
Session[]
hth,
Dave
[url]www.aspNetEmail.com[/url]
"Vincent V" <vincentv@-n0-5pam-optushome.com.au> wrote in message
news:OWCJ2DrQDHA.2312@TK2MSFTNGP12.phx.gbl...> 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
>
>
dave wanta Guest
-
George Zacharias #3
Re: Variable scope
You can also try Viewstate["yourkey"] = "value" if you have viewstate
enabled.
George Zacharias.
"Vincent V" <vincentv@-n0-5pam-optushome.com.au> wrote in message
news:OWCJ2DrQDHA.2312@TK2MSFTNGP12.phx.gbl...> 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
>
>
George Zacharias Guest
-
Steve C. Orr, MCSD #4
Re: Variable scope
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
[url]http://Steve.Orr.net[/url]
"Vincent V" <vincentv@-n0-5pam-optushome.com.au> wrote in message
news:OWCJ2DrQDHA.2312@TK2MSFTNGP12.phx.gbl...> 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
>
>
Steve C. Orr, MCSD Guest
-
David Waz... #5
Re: Variable scope
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" <vincentv@-n0-5pam-optushome.com.au> wrote in message
news:OWCJ2DrQDHA.2312@TK2MSFTNGP12.phx.gbl...> 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
>
>
David Waz... Guest
-
A.Cicak #6
Variable scope
I have a class:
class CFoo
{
private var myvar;
function foo()
{
var xmlr:XML;
xmlr=new XML();
xmlr.onLoad=loader;
function loader()
{
how can I access myvar from here??
}
xmlr.load("bla.txt");
}
}
So How can I access myvar from function foo. If I cant how can I use
xml object (or any other with event) without braking all possible
programming rules?
A.Cicak Guest



Reply With Quote

