473,473 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

DataBinding CheckBoxList to an XElement

I have a CheckBoxList that I want to dataBind to an XElement. I got this
far:

CheckBoxLisgt.DataSource =
StockContract.Element("Glossary").Elements("Term") ;
CheckBoxList.DataBind();

It works in the sense that I get the "Term" element text for each list item.
What I really want to do is to do something like this for an output:

Word: Definition

The Definition text is found in
StockContract.Element("Glossary").Elements("Term") and Word text is found in
StockContract.Element("Glossary").Elements("Term") .Attributes("Word"). How
do I do something like this? The other issue I would have is accessing the
actual elements and attributes in the StockContract based on what checkboxes
are checked. Any ideas?

Jun 27 '08 #1
0 988

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Shaul Feldman | last post by:
Hello, I have something really awkward at work - fighting with CheckBoxList... How can I define CSS for ListItem in CheckBoxList programmatically. I add CheckBoxList's Items on the fly, something...
2
by: Martin | last post by:
Hi, Please can somebody explain how databinding is done on a checkbox list. I have the follwoing code which I would have thought was enough to databind a checkbox, but apparently not. The...
5
by: Patrick.O.Ige | last post by:
I'm binding a CheckBoxlist below in the ItemDataBound(the CheckBoxList is in a Datalist) By doing "li.Selected = True" i can see all the checkBoxes are selected. But what i want is to be able...
0
by: Jeppe Jespersen | last post by:
I basically have two controls on my form: A CheckboxList and a GridView. My gridView is bound to a sqlDataSource. In the dataSource's "where" clause, i specify that a parameter should equal the...
0
by: brian.newman | last post by:
I've created a dropdownlist whose values are drawn from an Access database. This list of items represents a user account. In the same record is a boolean field which records whether the user is...
1
by: sumitpal | last post by:
PLz help, I am trying to store the datavalue of a checkboxlist control in a datacoloumn in database.The selection mode is multiple. How can i do that?
2
by: Mike N. | last post by:
hello all: I am using LINQ to XML, but I think this issue is more widespread, here's an example of what I am trying to do: Dim testurl As String = "http://stats.enemyterritory.com/profile/...
0
by: Andy B | last post by:
Is there a way to databind a checkBoxList to a Dictionary<string, string> object? If so, how do you do it?
11
by: Michael Bray | last post by:
I'm playing around with XElement stuff, and I've come across a difficulty. The XML document that I'm reading contains an xmlns declaration on the main node... <root xmlns="http://www.me.com">...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.