asp.net equivalent for Application("Root")

  • Thread starter Thread starter TomislaW
  • Start date Start date
What is "Application("Root")" supposed to be holding? A simple Application
level variable/value?
Application["Root"] would be my guess, in C# at least......
 
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.
 
Curt_C said:
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 said:
What is asp.net equivalent for Application("Root") in asp?

I need name of my WebApplication and Application["Root"] is null
 
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 said:
Curt_C said:
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 said:
What is asp.net equivalent for Application("Root") in asp?

I need name of my WebApplication and Application["Root"] is null
 
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 said:
Curt_C said:
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 said:
What is asp.net equivalent for Application("Root") in asp?

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