arrays?

This is a discussion on "arrays?" within the ASP.NET Forum section. This forum, and the thread "arrays? are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > ASP.NET Forum

Notices




Closed Thread
 
LinkBack Thread Tools
  #1  
Old Sep 30th, 2003, 10:12
New Member
Join Date: Sep 2003
Location: Canada
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
arrays?

I am using a checkbox as follows:
protected System.Web.UI.WebControls.CheckBoxList cblReading;

Now I store the index(checked marked) in an array for postback method, i.e.,
I save the selected indexes in array :
ArrayList selItems = (ArrayList)Session["webform6_cblReading];

And I have to repopulate the cblReading on post back.
DataView for ReadingsList
// property delivers the list of Reading
private DataView ReadingsList
{
get
{
DataSet myDataSet = new DataSet ();
myDataSet.ReadXml(Server.MapPath("PersonalInterest s/Readings.xml"));
return (myDataSet.Tables["reading].DefaultView);
}
}


There should be two for loops

private void FillcblReading(DataView data)
{

this.cblReading.DataSource = data;
this.cblReading.DataMember = "title";
this.cblReading.DataTextField = "text";
this.cblReading.DataValueField = "value";
this.cblReading.DataBind();
ArrayList selItems = (ArrayList)Session["webform6_cblReading];
if ((ArrayList)Session["webform6_cblReading] != null)
{
foreach (? in selItems)
{

// Check to see where the index is and assign the item.Selected = true
foreach (ListItem item in this.cblReading.Items)
{
item.Selected =
}
}
}
}
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!

  #2  
Old Sep 30th, 2003, 12:44
Junior Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
So what exactly is the problem?
(try using the [code ] [/code ] tags to make your post clearer)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Closed Thread

Tags
arrays

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Problems with arrays Scream JavaScript Forum 2 Jan 10th, 2008 16:15
arrays images and backgroundImage gleb JavaScript Forum 0 Sep 9th, 2007 20:39
Looping through arrays assgar Starting Out 1 Apr 22nd, 2007 18:43
sending email arrays with php ppgpilot PHP Forum 2 Jan 25th, 2007 16:49
Unique Array of Arrays ktsirig Other Programming Languages 1 Jan 27th, 2006 16:30


All times are GMT. The time now is 14:23.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42