By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,636 Members | 1,941 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,636 IT Pros & Developers. It's quick & easy.

Getting Data From Application Object and C#

P: n/a
All -

This probably qualifies for the "Stupid Question of the Day" award but I am
stuck on this.

I have an IIS Application object in which I am storing a multi-dimensional
array. Later on in the application I am trying to retrieve this array and
set it to a local array, but I cannot get the right syntax (and I may be
doing it wrong completely).

I'm dimming a local variable as:
string [,] strViewArray;

I am then trying to set this Array equal to Application["navigationViews"],
the array defined in the Application object. I keep getting a build error
that says I cannot implicitly set the string array to an object. I
understand this error but I cannot figure out how to get the object cleanly
out of the Application object and into the Array variable.

Any help is greatly appreciated.

Thanks,

- Matt


Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
you can try :

string [,] strViewArray;
strViewArray = Application["...."] as string[,];

Brun

"Matthew Sajdera" <MS******@Cox.net> wrote in message
news:us**************@TK2MSFTNGP10.phx.gbl...
All -

This probably qualifies for the "Stupid Question of the Day" award but I am stuck on this.

I have an IIS Application object in which I am storing a multi-dimensional
array. Later on in the application I am trying to retrieve this array and
set it to a local array, but I cannot get the right syntax (and I may be
doing it wrong completely).

I'm dimming a local variable as:
string [,] strViewArray;

I am then trying to set this Array equal to Application["navigationViews"], the array defined in the Application object. I keep getting a build error
that says I cannot implicitly set the string array to an object. I
understand this error but I cannot figure out how to get the object cleanly out of the Application object and into the Array variable.

Any help is greatly appreciated.

Thanks,

- Matt

Nov 18 '05 #2

P: n/a
Bruno -

You are my best friend!

Thanks,

- Matt

"Bruno Sirianni" <br***********@virgilio.it> wrote in message
news:Dl*********************@news3.tin.it...
you can try :

string [,] strViewArray;
strViewArray = Application["...."] as string[,];

Brun

"Matthew Sajdera" <MS******@Cox.net> wrote in message
news:us**************@TK2MSFTNGP10.phx.gbl...
All -

This probably qualifies for the "Stupid Question of the Day" award but I

am
stuck on this.

I have an IIS Application object in which I am storing a multi-dimensional array. Later on in the application I am trying to retrieve this array and set it to a local array, but I cannot get the right syntax (and I may be
doing it wrong completely).

I'm dimming a local variable as:
string [,] strViewArray;

I am then trying to set this Array equal to

Application["navigationViews"],
the array defined in the Application object. I keep getting a build error that says I cannot implicitly set the string array to an object. I
understand this error but I cannot figure out how to get the object

cleanly
out of the Application object and into the Array variable.

Any help is greatly appreciated.

Thanks,

- Matt


Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.