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.
|
|
|
|
|
![]() |
||
quick syntax check. 2 second question.
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
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); } } } |
|
|
![]() |
| Tags |
| quick, syntax, check, second, question |
| Thread Tools | |
|
|
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 |