473,385 Members | 1,620 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.

asp.net equivalent for Application("Root")

What is asp.net equivalent for Application("Root") in asp?
Nov 18 '05 #1
5 1798
What is "Application("Root")" supposed to be holding? A simple Application
level variable/value?
Application["Root"] would be my guess, in C# at least......

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"TomislaW" <to*********@hotmail.com> wrote in message
news:OP*************@TK2MSFTNGP11.phx.gbl...
What is asp.net equivalent for Application("Root") in asp?

Nov 18 '05 #2
Since there is no Application("Root") in ASP, the equivalent would be
Application("Root") in ASP.Net, as there is no such thing in ASP.Net either.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"TomislaW" <to*********@hotmail.com> wrote in message
news:OP*************@TK2MSFTNGP11.phx.gbl...
What is asp.net equivalent for Application("Root") in asp?

Nov 18 '05 #3
Curt_C [MVP] wrote:
What is "Application("Root")" supposed to be holding? A simple
Application level variable/value?
Application["Root"] would be my guess, in C# at least......
"TomislaW" <to*********@hotmail.com> wrote in message
news:OP*************@TK2MSFTNGP11.phx.gbl...
What is asp.net equivalent for Application("Root") in asp?


I need name of my WebApplication and Application["Root"] is null
Nov 18 '05 #4
The Application Collection is a Collection of Application-level variables
that you define. If you don't define an Application["Root"] variable, it
doesn't exist.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"TomislaW" <to*********@hotmail.com> wrote in message
news:ey**************@tk2msftngp13.phx.gbl...
Curt_C [MVP] wrote:
What is "Application("Root")" supposed to be holding? A simple
Application level variable/value?
Application["Root"] would be my guess, in C# at least......
"TomislaW" <to*********@hotmail.com> wrote in message
news:OP*************@TK2MSFTNGP11.phx.gbl...
What is asp.net equivalent for Application("Root") in asp?


I need name of my WebApplication and Application["Root"] is null

Nov 18 '05 #5
Your web root depends on how you have your application configured. Normally
you can disseminate it from the server variable collections items. Theres
some code below to enumerate it.

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
int loop1 = 0;
int loop2 = 0;
NameValueCollection coll=Request.ServerVariables;

// Load ServerVariable collection into NameValueCollection object.
String[] arr1 = coll.AllKeys; // This will get names of all keys into a
string array.
for (loop1 = 0; loop1 < arr1.Length; loop1++)
{
Response.Write("Key: " + arr1[loop1] + "<br>");
String[] arr2=coll.GetValues(arr1[loop1]);
for (loop2 = 0; loop2 < arr2.Length; loop2++) {
Response.Write("Value " + loop2 + ": " + arr2[loop2] + "<br>");
}
}
"TomislaW" <to*********@hotmail.com> wrote in message
news:ey**************@tk2msftngp13.phx.gbl...
Curt_C [MVP] wrote:
What is "Application("Root")" supposed to be holding? A simple
Application level variable/value?
Application["Root"] would be my guess, in C# at least......
"TomislaW" <to*********@hotmail.com> wrote in message
news:OP*************@TK2MSFTNGP11.phx.gbl...
What is asp.net equivalent for Application("Root") in asp?


I need name of my WebApplication and Application["Root"] is null

Nov 18 '05 #6

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

Similar topics

2
by: Larry Woods | last post by:
I have defined a virtual directory and application called Test. The directory is C:\inetpub\wwwroot\Test. I created a trivial page: <% response.write Server.Mappath("/") %> When I execute...
5
by: Andrew Connell | last post by:
I can't find any documentation for the tilde (~) when it's found at the beginning of a string in a URL. Is that something that points back to the root of the site?
4
by: Julie | last post by:
I stumbled across Application from someone else's code, and I can't find out squat about by searching MS, Google, or Google Groups. For the most part, this is returning the fully-qualified name...
1
by: Alex Maghen | last post by:
I'm not sure if the question belongs in one of the Visual Studio boards or here but it's like this In Visual Studio.NET, if I want to create a Web Application, I seem to have to create it UNDER...
1
by: MS | last post by:
I have an ASP.NET based site, and the main application is stored under a virtual directory called "Main". So in order to view my site, a browser would have to visit www.mydomain.com/Main/. But...
0
by: hamstak | last post by:
While attempting to perform a build on an .aspx page from within VS 2005 I receive the "Could not load type" error pertaining to the class representing the page. The class is derived from a custom...
2
by: cmay | last post by:
I have a web application that I want to run using the "ASP.NET Development Server" when I am working locally. When I go to do this however, I don't see an option to set the Virtual Path. By...
1
by: Tomas | last post by:
When I try to load my xslt i get an xml exception with the message "Root element is missing". The stylesheet works when I preview it in stylus studio, but apparently not in my application. Any...
5
by: MichiMichi | last post by:
When using Server.MapPath on IIS 5 on my localhost everything works well. All of the following commands are executed without any error Response.Write(Server.MapPath("/app_test") & "<br>")...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.