473,387 Members | 1,745 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,387 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 1364
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...
6
by: Martin | last post by:
I'd like to be able to get the name of an object instance from within a call to a method of that same object. Is this at all possible? The example below works by passing in the name of the object...
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: 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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.