global variable/object without session or application variable
I have 1 or more dynamically assigned user controls. Now i need to pass a user control's value to another user controls during page load. We can do using session variable, but the problem over here is it would slow down my application. So i would like to attain this without using the session or application variable.
Please let me know if you have any questions.
thiyaThank you in advance. I am pleased to return the favor.
Read this post.Jared LivingstonMrLivingston.com - Livingston Family WebsiteTest/Demo site - moonmark.com
Reviewed the posted reply. That one...Application instances, with global.asax, and Application variables.
I'm in a bit of confusion regarding applications, global.asax and application variables.
I understand that application-wide variables should be declared in the global.asax file. Now, if u declare them in the application_start, then they exist for the whole application, only being created once when the app is started. If they are declared in INIT, then a set of all the variables is created for EVERY instance of the application (every distinct user).
My question is, how do i access these variables in the global.asax file from my aspx pages? I want to be able to access the init one...application variable vs static variables
i have some lookup values that will not change frequently, so i thaught of storing it in the application scope or in a static variable of a class and use it. i am sure that this value will not change at all. so which method i can use to improve the performance ie hitting the DB has to be reduced. I know if i store in the application scope the value will be loaded only once and until we reset the iis the value will be in the memory. but how abt static variables? when it will be loaded in to memory and how frequent it will be destroyed?
in short, which method to use and why?
Thank ...global variable vs local variable
i have a scenario like function is called more than 1000 times.in that function i declared a varible and assigning a value .i felt like declare a global varible use it in that function and assign value.which is best.please tell me in performance point of view.
thanks in advance
Hai Good Morning you have call the function more than 1000 times Better use Global variables, so you can call the function, anywhere.. it has good performance.suppose it you want assign different values to the variables , whenever the function has been called for that use local ...Shared Variable VS Instance Variable
I am a newbie to Powerbuilder. I have a question on the terms of Shared
Variable and Instance Variable. What are they? What's the difference between
I have already looked for them in books and the Internet, but due to a lack
of examples, I can't figure them out clearly.
Please kindly advise me if possible. Thanks for you kind attention.
An instance variable and a shared variable turn out to be the same *unless*
you open multiple instances of your window, say w_1.
So, suppose you have an instance window called w_1, with...Declaring Global Variables and Global External Function By PowerScript
Does anyone can tell me, can I declare the global external function /
global Variables by PowerScript ( such as, within the application's open
event ), not in 'declare painter' ???
No. They need to be declared within the Global Variables painter.
Ron Gallagher, CPDP
samkola wrote in message <01beee19$8715d2a0$2d01a8c0@testing>...
>Does anyone can tell me, can I declare the global external function /
>global Variables by PowerScript ( such as, within the application's open
>event ), not i...Application vs shared vs cached
I need an application level hashtable. This is to prevent two sessions with the same userid from accessing the web application.
Should I do this in Global.asax:Public Shared fgh As Hashtable = New Hashtable()or this:Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
Application("cde") = New Hashtable()
End Subor this:Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
HttpRuntime.Cache("abc") = New Hashtable()
If the cache method is better, should I still use SyncLock ( I thought the cache o...Quickie question: Declaring a global-level variable with Global.asax
My instructor told me it might be best to create an SQL connection in global.asax instead of making new connections for every form I create.
However, when I declare the variable in Session_Start, it still doesn't see the variable on the other form I have. Obviously there is something I'm not getting here.
So my question might sound trite, but I simply need to create an SQL connection variable that can be accessed from any of my .aspx pages.
Your professor does not understand ASP.NET and connection pooling. Creating a single connection in Global.asax and using it on ...Defining autoinstantiate variables as global application variables
I�ve defined several global application variables that were
autoinstantiate Non visual classes.
After doing that strange problems happened: When saving window objects
PB always crashed.
No errors when rebuilding PBL�s or regenerate.
After moving these global variables to application manager NVUO (defined
as global but not autoinstantiate ) all problems disappeared.
I�m well aware about the problem defining global autoinstantiate
variables at PB 6.
Why this problem did not fixed in the last PB 7 build?
General info: PB 7 build 7024 , NT 4 SP 5
...Advice: not global variables but directory-level variables
I'm working on a .net 2.0 web site where basically each directory represents a separate implementation of a basic template. I have a few bits of information I want to be available to every page in that directory (and different for each directory) - String or Boolean variables. The values of these need to be easily human-editable.
What is the best way to set this up? I'm considering adding a few keys to a web.config file for each directory. Does this sound like a good idea to anyone here or is there a better way you've seen or done?
Soun...Global Variables for Each Instance of a Web Application
I am developing some modules for DNN 1.10 and I have a question regarding scope. The module I am writing is part of a set of modules that essentially allow my company to interface our ecommerce software with the awesome base of DNN.
These modules must retain a userid that all modules use to tie everything together as far as a customer session goes. I wanted the use of the userid to be transparent to me as I developed so I made a public shared property called uid that would get a new uid once and then not until the end of that application's instance - or so I thought.
For each codeb...variable of variables
Say I have 2 scenarios and I want to use a different
variable depending on which scenario applies without coding
So I could have a database table t_variables which has:
In my Powerbuilder code I'd have values in v_name &
What I'd like to be able to do is to select which variable
to use from the table and assign that to something, e.g.
where scenario = 1
so at this point v_variable would be 'v_name'...variable variables?
How to make a variable receive an increment in the name?
I want to do it for example:
Label1->Caption = "1";
Label2->Caption = "2";
Label3->Caption = "3";
Label4->Caption = "4";
And I want to do something like that:
for (i=1; i<5; i++)
Label+i->Caption = i;
Any idea? Can I do something like that?
Thanks and regards
Create a vector of pointers to the various objects.
In your case below, construct a vector (called Labels) of pointers to TLable
long enough to hold pointers to...Complex Objects Stored in the Cache, as Application Variables, and as Session variables
I don't know why, but I had always thought that if I was dealing with a DataTable stored as a Session variable, that if retrieved it from the Session pool and made changes to it that I had to explicitly stored it back in the Session pool in order for those changes to be "permanent". I just discovered that this is not true. And it actually makes sense why I don't.But I'm curious, if instead I was using the Application variable pool or the cache, would it work the same way or would I, in fact, have to explicitly store the altered object back?Robert Robert...