quick syntax check. 2 second question.

This is a discussion on "quick syntax check. 2 second question." within the ASP.NET Forum section. This forum, and the thread "quick syntax check. 2 second question. are both part of the Program Your Website category.



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

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 29th, 2003, 17:17
New Member
Join Date: Sep 2003
Location: Canada
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
quick syntax check. 2 second question.

For some reason the value of the checkboxlist is not being saved.
Can someone give me a hand.
protected System.Web.UI.WebControls.CheckBoxList cblReading;
bool SupposedToBeSelected(string itemValue, ArrayList selectedItems)
{
foreach (object s in selectedItems)
{
if (itemValue == s.ToString()) return true;
}
return false;
}

private void FillcblReading(DataView data)
{
this.cblReading.DataSource = data;
this.cblReading.DataMember = "title";
this.cblReading.DataTextField = "text";
this.cblReading.DataValueField = "value";
this.cblReading.DataBind();
// restore the selected title (if a user had
already selected a title on a previous page session)
if ((ArrayList)Session["webform6_cblReading] !=
null)
{
ArrayList selItems = (ArrayList)Session["webform6_cblReading];


foreach (ListItem item in
this.cblReading.Items)

{
// Get the index of selItems and
see if true
item.Selected =
SupposedToBeSelected(item.Value, selItems);


}
}

}

Closed Thread

Tags
quick, syntax, check, second, question

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
quick favour (just check a link for me again please) alexgeek Webforumz Cafe 13 Sep 19th, 2007 06:20
quick question capluvshll Starting Out 5 May 2nd, 2007 19:13
Java out.println syntax question flamin_mongrel Other Programming Languages 1 Oct 24th, 2006 21:27
Easy question about flash 8 syntax artdog Flash & Multimedia Forum 4 Sep 26th, 2006 18:21


All times are GMT. The time now is 15:57.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs 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 43