473,545 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Checkboxlist with XML

me
Hello,

I have a novice question:

How do you populate a checkboxlist with XML data?

TIA
Nov 12 '05 #1
2 1284
Actually, that depends on a lot.

Has it to be high performant?
Do you have to search in the xml file?
Do you need to do some transformation of the xml file?
....

You can find a lot of documentation about this on the internet.
For example, a nice document of the different way's you can use, can you
find at http://support.softartisans.com/kbview.aspx?ID=674

It describes the most commenly used way's to access the data in xml files,
and also mentions when to use which way.

If I had to choose, I'd use the XPathNavigator when I have to search in the
xml file for values needed to populate the checkboxlist (for example when you
have a very large xml file, with somewhere in it the values you need).

At the other hand, what is not mensioned in the document, but might be
interesting :
When you have a simple xml file structure, and you are going to use it (or
xml files with are identically in structure) a lot. And when the structure of
the xml file will not change, then I would create a new class for it.
(This is very simple : In VS2003, include an example xml file in the
project, double click on it, richt click on the document, generate a schema
for it, open that one, richt click and create a dataset from it. At that
moment a new class is created, which inherents from DataSet. This class you
can use to 'ReadXml' and 'WriteXml' to create and save a 'dataset'.

Kind regards,

Michel

"me" wrote:
Hello,

I have a novice question:

How do you populate a checkboxlist with XML data?

TIA

Nov 12 '05 #2
me
Michel

Thanks.
"Michel" <Mi****@discuss ions.microsoft. com> wrote in message
news:03******** *************** ***********@mic rosoft.com...
Actually, that depends on a lot.

Has it to be high performant?
Do you have to search in the xml file?
Do you need to do some transformation of the xml file?
...

You can find a lot of documentation about this on the internet.
For example, a nice document of the different way's you can use, can you
find at http://support.softartisans.com/kbview.aspx?ID=674

It describes the most commenly used way's to access the data in xml files,
and also mentions when to use which way.

If I had to choose, I'd use the XPathNavigator when I have to search in the xml file for values needed to populate the checkboxlist (for example when you have a very large xml file, with somewhere in it the values you need).

At the other hand, what is not mensioned in the document, but might be
interesting :
When you have a simple xml file structure, and you are going to use it (or
xml files with are identically in structure) a lot. And when the structure of the xml file will not change, then I would create a new class for it.
(This is very simple : In VS2003, include an example xml file in the
project, double click on it, richt click on the document, generate a schema for it, open that one, richt click and create a dataset from it. At that
moment a new class is created, which inherents from DataSet. This class you can use to 'ReadXml' and 'WriteXml' to create and save a 'dataset'.

Kind regards,

Michel

"me" wrote:
Hello,

I have a novice question:

How do you populate a checkboxlist with XML data?

TIA

Nov 12 '05 #3

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

Similar topics

0
7934
by: Bryce Budd | last post by:
Hello All, I've been a taker of information from newsgroups for a long time and thought I'd finally make a contribution back to the community whose supported me when I've needed it. After all before commercialization took over that was the beauty of the Internet! I've create a checkboxlist validator control...something MS should have...
4
8063
by: dm_dal | last post by:
Is there a know issue surrounding the CheckBoxList control and it's viewstate? When my control is created, it's ListItems are checked as needed, but on a postback, they loose their Selected status. David
4
6505
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 like dim li as ListItem li = new ListItem("title","value"); '' how to define here the CSS for List Item, not CheckBoxList?!?!?!...
5
7892
by: Eirik Eldorsen | last post by:
I'm trying to code a reapter that for each listelement show a checkboxlist. I'm almost there. The only thing I can't figure out is how to set the ID of the checkboxlists. This is my code: <asp:CheckBoxList id='<%# Convert.ToString(DataBinder.Eval(Container.DataItem, "ID")) %>' runat="server" ..... This code will result in the following...
3
2909
by: I am Sam | last post by:
I keep getting the following error message when I try to iterate through a CheckBoxList control: Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the...
5
13375
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 to get a Boolean value TRUE or FALSE when a checkBox is selected. When the checkBoxList was out of the DataList i used "OnSelectedIndexChanged"...
4
4031
by: Patrick.O.Ige | last post by:
I have a CheckBoxList in a DataList and i'm trying to get item Selected after doing a postBack. I have set my CheckBoxlist AutoPostBack="True" Any ideas what 'm doing wrong? It seems not to work:( Thanks My CheckBoxList in the DataList Below
2
5224
by: Patrick.O.Ige | last post by:
I have some boolean value(1 or 0 ) in a table and i want a databinded CheckBoxList to present the selected values on the page.. With CheckBox i know i can se the Checked property like so :- <asp:CheckBox id="chk" checked=<% Databind.Eval("This returns 1 or 0")%> runat="server"%> Any help how i can do it using CheckBoxList?
0
2157
by: Jai | last post by:
Hi, Somebody please tell me how to bind(two way) a checkboxlist with objectdatasource if the checkboxlist is inside a formview..... Code of FormView is like this::--- <asp:FormView ID="FormView1" runat="server" DataSourceID="ObjectDataSource1"> <EditItemTemplate>
0
2402
by: Jai | last post by:
Hi, Somebody please tell me how to bind(two way) a checkboxlist with objectdatasource if the checkboxlist is inside a formview..... Code of FormView is like this::--- <asp:FormView ID="FormView1" runat="server" DataSourceID="ObjectDataSource1"> <EditItemTemplate>
0
7475
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7409
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7664
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7437
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5343
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4958
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3465
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3446
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1900
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.