473,320 Members | 2,080 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,320 software developers and data experts.

Getting Data From Application Object and C#

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
2 1045
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Shiv | last post by:
I have a servlet driven web application using ServletExec 4.2 AS, IIS 4.0 as the platform. Some user data is stored is persisted in a user object at the beginning of the session which includes use...
2
by: Matthew Sajdera | last post by:
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...
1
by: Nathan Sokalski | last post by:
I have retrieved data from a database using a SELECT statement that includes an INNER JOIN. The data seems to be retrieved to the DataSet OK, but I am having trouble getting the data from the...
8
by: bryan | last post by:
Is there any way I can get the application path (the one returned by Request.ApplicationPath) in the Application_Start method in Global.asax? Request is not valid there. On a related note, is there...
3
by: | last post by:
I wrote a class in VB.NET to export the contents of a datagrid to Excel. It works perfectly on my machine, but it fails on my customers' PCs that have identical versions of Win XP (SP1) and Excel...
1
by: thangchan | last post by:
Hi all, i am getting SQL update problem. as below ======================error messages ======================= Server Error in '/CMS' Application....
1
by: eisenb | last post by:
microsoft.public.dotnet.languages.vb.upgrade isn't getting much traffic, so I'll try here. Ours is a VB6 shop exploring .NET. First I wrote a new application with VB .NET 2003 to create a pdf...
2
by: lanmou | last post by:
hi, i am creating a form in my application which dynamically creates controls by getting information from a table in ms access database .now i would like it to get the text by using another table ....
1
by: iwdu15 | last post by:
hi, how can i get the icon associated with a certain file type? thanks -- -iwdu15
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.