473,385 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

diff between Application object and static variable in asp .net


diff between Application object and static variable in asp .net. I can
access both the objects in my web page.
I will be grateful if some one can help me understand the difference.

Regards
Ganesan
Nov 19 '05 #1
1 1002
Application is thread-safe. The minute speed increase you get from using
static variables doesn't mean much when you have to lock all access to them.

If your data is readonly, you can use static variables (since you don't care
if 2 users read at the same time)...or a constant if you know the data at
design time...but I tend to prefer configuration values even for this...

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Ganesan selvaraj" <Ganesan se******@discussions.microsoft.com> wrote in
message news:DA**********************************@microsof t.com...

diff between Application object and static variable in asp .net. I can
access both the objects in my web page.
I will be grateful if some one can help me understand the difference.

Regards
Ganesan

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: DDE | last post by:
Hi All, Reformulating a problem from a previous post: How can I access an application variable from a static method? When I try: string myString = Application{"thisString"].ToString; ...
3
by: Patrick | last post by:
Hi I have the following problem. When starting my asp.net application, i read a encrypted string from a file, decrypt it and want this values to be available in the complete application. they...
4
by: Keith Chadwick | last post by:
I am having some trouble referencing an Application("myVar") variable from within a module.vb file on my ASP.NET site. According to the documentation I should be able to reference...
9
by: William LaMartin | last post by:
I have a problem, mentioned here before, of Session and Application variables disappearing at one site but not at others or on my development computer. The problem is illustrated by an example...
8
by: Anthony P. Mancini | last post by:
I'm working on a proof of concept that will ultimately be deployed on a load balancer. For the sake of a preliminary demonstration I created a C# object and marked it's attributes as Public...
8
by: Vishwanathan Raman | last post by:
Hi I have a declared a static DataSet object SOBJ in Global.asax.I also have a localy defined DataSet LSOBJ in Global.asax which I am storing in Application State.Is there any technical...
4
by: GS | last post by:
Hi, I'd rather start from a good design and go from there so would be greatfull for any input. I have a simple ASP.NET application and would like to make solution elegant. I store settings in...
3
by: rwoo_98 | last post by:
Does anyone know the difference between defining a static variable inside Global vs using an Application variable? For example Using a static int variable. public class Global :...
2
by: pinki panda | last post by:
i want to knw the diff between static class and abstract class .i would appreciate if its followed by example
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.