Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 29th, 2006, 09:21 AM
Authorized User
 
Join Date: Nov 2005
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Getting an item from the array

Dear all

I have created an array that contains lots of items, and one of them is a PageID. During the process of the form, I am populating it with data.

Now i wish to retreive an item in the array, whereby the PageID is the one I am working with.

I have the following code:-

this.PageID = System.Convert.ToInt32(e.CommandArgument);
ViewState["PageID"] = this.PageID;
ArrayList _pageArr = new ArrayList();
_pageArr = (ArrayList)Cache["PageItem"];

PageItem _pageItem = new PageItem();
_pageItem = (PageItem)_pageArr[.....];

My problem is, what shall I insert in the [square brackets]?

Thanks for your help

Johann






Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete item from array sektor Excel VBA 16 April 30th, 2008 04:36 AM
Deleting an Item from an Array creejohnson Classic ASP Professional 5 September 14th, 2006 12:30 PM
Want Combo Box first item if only 1 item markw707 Access 3 June 9th, 2004 04:03 PM
Remove item from an array? jefferis PHP How-To 5 November 27th, 2003 11:38 AM
Find Out First Item of each item Group Jane SQL Language 1 November 22nd, 2003 12:42 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.