building an XML page
-
Hello Coders, Im facing a problem building a C#.net code that will build me the following XML page:
<?xml version="1.0"?>
<chores>
<day title="some title">
<job a=".." b="text.." c="..text.." d="d..."/>
<job a=".." b="text.." c="..text.." d="d..."/>
<job a=".." b="text.." c="..text.." d="d..."/>
</day>//updating a new DAY tag
<day title="some title">
<job a=".." b="text.." c="..text.." d="d..."/>
<job a=".." b="text.." c="..text.." d="d..."/>
<job a=".." b="text.." c="..text.." d="d..."/>
</day>
//and again.. etc..<day title="some title">
<job a=".." b="text.." c="..text.." d="d..."/>
<job a=".." b="text.." c="..text.." d="d..."/>
<job a=".." b="text.." c="..text.." d="d..."/>
</day></chores>
I've tried hundreds of codes, nothing worked the way i need it. i will appreciate any help PLEASE. What im trying to do is the following: I have a page that has 4 textboxes, each one is supposed to save some value .. lets say a,b,c,d.. Another textbox is for the day attribute which is TITLE according to my example I need to add whenever i need a DAY. with it's attribute. and "jobs" like that example. whenever i need to make a new "DAY" i need it do be after the last one. i mean i need it to update the new <DAY> after the last one's and all of that i need it to come before the each time i update the xml file</chores> Please i'd really appreciate any help with this. im new to XML and im trying to make an XML management page for some project.If what i've said wasnt clear im ready to explain again. Please tell me what to do and how to do it, or if you have any samples for handling such an issue it will be great too
-
Hello Coders, Im facing a problem building a C#.net code that will build me the following XML page:
<?xml version="1.0"?>
<chores>
<day title="some title">
<job a=".." b="text.." c="..text.." d="d..."/>
<job a=".." b="text.." c="..text.." d="d..."/>
<job a=".." b="text.." c="..text.." d="d..."/>
</day>//updating a new DAY tag
<day title="some title">
<job a=".." b="text.." c="..text.." d="d..."/>
<job a=".." b="text.." c="..text.." d="d..."/>
<job a=".." b="text.." c="..text.." d="d..."/>
</day>
//and again.. etc..<day title="some title">
<job a=".." b="text.." c="..text.." d="d..."/>
<job a=".." b="text.." c="..text.." d="d..."/>
<job a=".." b="text.." c="..text.." d="d..."/>
</day></chores>
I've tried hundreds of codes, nothing worked the way i need it. i will appreciate any help PLEASE. What im trying to do is the following: I have a page that has 4 textboxes, each one is supposed to save some value .. lets say a,b,c,d.. Another textbox is for the day attribute which is TITLE according to my example I need to add whenever i need a DAY. with it's attribute. and "jobs" like that example. whenever i need to make a new "DAY" i need it do be after the last one. i mean i need it to update the new <DAY> after the last one's and all of that i need it to come before the each time i update the xml file</chores> Please i'd really appreciate any help with this. im new to XML and im trying to make an XML management page for some project.If what i've said wasnt clear im ready to explain again. Please tell me what to do and how to do it, or if you have any samples for handling such an issue it will be great too
Can you show us a little of what you tried? What you are trying to do is maintaining a kind of database. On the assumption that you really want it as xml-file : option 1 : Read your file as XmlDocument and add nodes as you add entries. option 2 : Create a dedicated class model with serializing/deserializing. Both methods have as disadvantage that everything get loaded in memory. To prevent that you might have to split your model in multiple files. Google for XmlDocument and/or XSD utility. If you need further clarification, just ask.
-
Can you show us a little of what you tried? What you are trying to do is maintaining a kind of database. On the assumption that you really want it as xml-file : option 1 : Read your file as XmlDocument and add nodes as you add entries. option 2 : Create a dedicated class model with serializing/deserializing. Both methods have as disadvantage that everything get loaded in memory. To prevent that you might have to split your model in multiple files. Google for XmlDocument and/or XSD utility. If you need further clarification, just ask.
i've tried this code for example
XmlDocument XDoc = new XmlDocument();
XmlElement Xchores = XDoc.CreateElement("day");
XmlElement XElemRoot = XDoc.CreateElement("chores");
XElemRoot.AppendChild(Xchores);
Xchores.SetAttribute("label", "" + this.txtBoxCat.Text + "");
// Create root node.
//Add the node to the document.
XDoc.AppendChild(XElemRoot);
XmlElement Xjob = XDoc.CreateElement("job");
while (this.Label5.Text == "1")
{
Xjob.SetAttribute("a", "" + this.txtBoxAbout.Text + "");
Xjob.SetAttribute("b", "" + this.txtBoxSize.Text + "");
Xjob.SetAttribute("c", "" + this.txtBoxPrice.Text + "");
Xjob.SetAttribute("d", "" + this.txtBoxAmount.Text + "");
Xchores.AppendChild(Xjob);
XDoc.Save("chores2.xml");
}and ive tried it by making a dataset of the elements
DataSet ds = new DataSet(); ds.ReadXml("chores2.xml"); DataTable dt = new DataTable(); dt.Columns.Add(new DataColumn("a")); dt.Columns.Add(new DataColumn("b")); dt.Columns.Add(new DataColumn("c")); dt.Columns.Add(new DataColumn("d")); DataRow dr = dt.NewRow(); dr\[0\] = ""+this.txtBoxSize.Text+""; dr\[1\] = "" + this.txtBoxAbout.Text + ""; dr\[2\] = "" + this.txtBoxAmount.Text + ""; dr\[3\] = "" + this.txtBoxSize.Text + ""; dt.Rows.Add(dr); ds.Tables.Add(dt); ds.Relations.Add(new
DataRelation("myrel", ds.Tables[1].Columns[0], ds.Tables[0].Columns[0]));
ds.Relations[0].Nested = true;
ds.WriteXml("chores2.xml");and i've tried it by getting the values from an access database and save them as an XML file also that didnt help approaching my goal
OleDbConnection con = new OleDbConnection();
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db.mdb";
OleDbDataAdapter da = new OleDbDataAdapter("Select * from job1", con);
DataSet ds = new DataSet("chores");
DataTable xjob = new DataTable();
xjob = xjob.Tables["job"];
da.Fill(ds, "day");
ds.WriteXml("chores2.xml");
*/
string jobName = this.TextBox2.Text;
OleDbConnection con = new OleDbConnection();
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db.mdb";
OleDbDataAdapter da = new OleDbDataAdapter("Select * from "+jobName+"", -
i've tried this code for example
XmlDocument XDoc = new XmlDocument();
XmlElement Xchores = XDoc.CreateElement("day");
XmlElement XElemRoot = XDoc.CreateElement("chores");
XElemRoot.AppendChild(Xchores);
Xchores.SetAttribute("label", "" + this.txtBoxCat.Text + "");
// Create root node.
//Add the node to the document.
XDoc.AppendChild(XElemRoot);
XmlElement Xjob = XDoc.CreateElement("job");
while (this.Label5.Text == "1")
{
Xjob.SetAttribute("a", "" + this.txtBoxAbout.Text + "");
Xjob.SetAttribute("b", "" + this.txtBoxSize.Text + "");
Xjob.SetAttribute("c", "" + this.txtBoxPrice.Text + "");
Xjob.SetAttribute("d", "" + this.txtBoxAmount.Text + "");
Xchores.AppendChild(Xjob);
XDoc.Save("chores2.xml");
}and ive tried it by making a dataset of the elements
DataSet ds = new DataSet(); ds.ReadXml("chores2.xml"); DataTable dt = new DataTable(); dt.Columns.Add(new DataColumn("a")); dt.Columns.Add(new DataColumn("b")); dt.Columns.Add(new DataColumn("c")); dt.Columns.Add(new DataColumn("d")); DataRow dr = dt.NewRow(); dr\[0\] = ""+this.txtBoxSize.Text+""; dr\[1\] = "" + this.txtBoxAbout.Text + ""; dr\[2\] = "" + this.txtBoxAmount.Text + ""; dr\[3\] = "" + this.txtBoxSize.Text + ""; dt.Rows.Add(dr); ds.Tables.Add(dt); ds.Relations.Add(new
DataRelation("myrel", ds.Tables[1].Columns[0], ds.Tables[0].Columns[0]));
ds.Relations[0].Nested = true;
ds.WriteXml("chores2.xml");and i've tried it by getting the values from an access database and save them as an XML file also that didnt help approaching my goal
OleDbConnection con = new OleDbConnection();
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db.mdb";
OleDbDataAdapter da = new OleDbDataAdapter("Select * from job1", con);
DataSet ds = new DataSet("chores");
DataTable xjob = new DataTable();
xjob = xjob.Tables["job"];
da.Fill(ds, "day");
ds.WriteXml("chores2.xml");
*/
string jobName = this.TextBox2.Text;
OleDbConnection con = new OleDbConnection();
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db.mdb";
OleDbDataAdapter da = new OleDbDataAdapter("Select * from "+jobName+"",Your approach with XmlDocument in itself works, I tried your code. What you need to to there is first checking if the file exists and if so
xDoc.Load();
.FileInfo fi1 = new System.IO.FileInfo(@"c:\\temp\\chores2.xml"); if (!fi1.Exists) { XDoc.Load(@"c:\\temp\\chores2.xml") } else { XmlElement XElemRoot = XDoc.CreateElement("chores"); XDoc.AppendChild(XElemRoot); }
To add a job to a particular day you need to find the node with the right title :
XDoc.SelectSingleNode("descendant::day[@title='YourTitle']");
You can now add your jobs to it. About option 2, MS has a utility called XSD. On my PC it's in :
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\xsd.exe
With your xml you can generate an xsd, and with the xsd you can generate a .cs file. It has all the classes and attributes you need. You can and should edit it to suit your needs. The only thing left to do is write a serializer and a deserializer. The code would look something like this (I removed all attributes)
public partial class chores {
private choresDay\[\] itemsField; public choresDay\[\] Items { get { return this.itemsField; } set { this.itemsField = value; } }
}
public partial class choresDay {
private choresDayJob\[\] jobField; private string titleField; public choresDayJob\[\] job { get { return this.jobField; } set { this.jobField = value; } } public string title { get { return this.titleField; } set { this.titleField = value; } }
}
public partial class choresDayJob {
private string aField; private string bField; private string cField; private string dField; public string a { get { return this.aField; } set { this.aField = value; } } public string b { get { return this.bField; } set { this.bField = value; } } public string c { get { return this.cField; } set { this.cField = value; } } publ
-
Your approach with XmlDocument in itself works, I tried your code. What you need to to there is first checking if the file exists and if so
xDoc.Load();
.FileInfo fi1 = new System.IO.FileInfo(@"c:\\temp\\chores2.xml"); if (!fi1.Exists) { XDoc.Load(@"c:\\temp\\chores2.xml") } else { XmlElement XElemRoot = XDoc.CreateElement("chores"); XDoc.AppendChild(XElemRoot); }
To add a job to a particular day you need to find the node with the right title :
XDoc.SelectSingleNode("descendant::day[@title='YourTitle']");
You can now add your jobs to it. About option 2, MS has a utility called XSD. On my PC it's in :
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\xsd.exe
With your xml you can generate an xsd, and with the xsd you can generate a .cs file. It has all the classes and attributes you need. You can and should edit it to suit your needs. The only thing left to do is write a serializer and a deserializer. The code would look something like this (I removed all attributes)
public partial class chores {
private choresDay\[\] itemsField; public choresDay\[\] Items { get { return this.itemsField; } set { this.itemsField = value; } }
}
public partial class choresDay {
private choresDayJob\[\] jobField; private string titleField; public choresDayJob\[\] job { get { return this.jobField; } set { this.jobField = value; } } public string title { get { return this.titleField; } set { this.titleField = value; } }
}
public partial class choresDayJob {
private string aField; private string bField; private string cField; private string dField; public string a { get { return this.aField; } set { this.aField = value; } } public string b { get { return this.bField; } set { this.bField = value; } } public string c { get { return this.cField; } set { this.cField = value; } } publ
Hi Estys, First of all thank you a lot for your help and time, i really appreciate that. Second, i think im gonna take option #1:) lol. Anyway, this is the code i've made for now, im not sure about it but i'd really appreciate more help.
protected void Button1_Click(object sender, EventArgs e)
{
XmlDocument XDoc = new XmlDocument();
FileInfo fi1 = new System.IO.FileInfo("chores2.xml");
if (!fi1.Exists)
{XDoc.Load("chores2.xml"); } else { XmlNode root = XDoc.DocumentElement; XDoc.SelectSingleNode("descendant::day\[@title='"+this.dropdwnlst.selectedvalue+"'\]"); XmlElement Xjob = XDoc.CreateElement("job"); Xjob.SetAttribute("a", "" + this.txtBoxProduct.Text + ""); Xjob.SetAttribute("b", "" + this.txtBoxSize.Text + ""); Xjob.SetAttribute("c", "" + this.txtBoxPrice.Text + ""); Xjob.SetAttribute("d", "" + this.txtBoxAmount.Text + "") XDoc.Save("chores2.xml"); }
}
this is what im thinking about, i have 4 text boxes for the job attributes. with another DropDownList that through it i can choose what kind of a "DAY" according to the title i want to play with and add "jobs". So, this cute line
XDoc.SelectSingleNode("descendant::day[@title='"+this.dropdwnlst.selectedvalue+"']");
is really great, but how i can control my selected node and enter the correct attributes
Xjob.SetAttribute("a", "" + this.txtBoxProduct.Text + "");
Xjob.SetAttribute("b", "" + this.txtBoxSize.Text + "");
Xjob.SetAttribute("c", "" + this.txtBoxPrice.Text + "");
Xjob.SetAttribute("d", "" + this.txtBoxAmount.Text + "")to it? Thanks again for your help.
-
Hi Estys, First of all thank you a lot for your help and time, i really appreciate that. Second, i think im gonna take option #1:) lol. Anyway, this is the code i've made for now, im not sure about it but i'd really appreciate more help.
protected void Button1_Click(object sender, EventArgs e)
{
XmlDocument XDoc = new XmlDocument();
FileInfo fi1 = new System.IO.FileInfo("chores2.xml");
if (!fi1.Exists)
{XDoc.Load("chores2.xml"); } else { XmlNode root = XDoc.DocumentElement; XDoc.SelectSingleNode("descendant::day\[@title='"+this.dropdwnlst.selectedvalue+"'\]"); XmlElement Xjob = XDoc.CreateElement("job"); Xjob.SetAttribute("a", "" + this.txtBoxProduct.Text + ""); Xjob.SetAttribute("b", "" + this.txtBoxSize.Text + ""); Xjob.SetAttribute("c", "" + this.txtBoxPrice.Text + ""); Xjob.SetAttribute("d", "" + this.txtBoxAmount.Text + "") XDoc.Save("chores2.xml"); }
}
this is what im thinking about, i have 4 text boxes for the job attributes. with another DropDownList that through it i can choose what kind of a "DAY" according to the title i want to play with and add "jobs". So, this cute line
XDoc.SelectSingleNode("descendant::day[@title='"+this.dropdwnlst.selectedvalue+"']");
is really great, but how i can control my selected node and enter the correct attributes
Xjob.SetAttribute("a", "" + this.txtBoxProduct.Text + "");
Xjob.SetAttribute("b", "" + this.txtBoxSize.Text + "");
Xjob.SetAttribute("c", "" + this.txtBoxPrice.Text + "");
Xjob.SetAttribute("d", "" + this.txtBoxAmount.Text + "")to it? Thanks again for your help.
Your form code should look like this :
public partial class choreForm : Form { XmlDocument xDoc = new XmlDocument(); public choreForm() { InitializeComponent(); } private void choreForm\_Load(object sender, EventArgs e) { FileInfo fi1 = new FileInfo(GetFileName()); if (fi1.Exists) { xDoc.Load(GetFileName()); } else { xDoc.AppendChild(xDoc.CreateElement("chores")); } } private void button1\_Click(object sender, EventArgs e) { **XmlElement xDay = xDoc.SelectSingleNode("descendant::day\[@title='" + this.dropdwnlst.selectedvalue + "'\]") as XmlElement; if (xDay == null) { xDay = xDoc.CreateElement("day"); xDay.SetAttribute("title", this.dropdwnlst.selectedvalue); xDoc.FirstChild.AppendChild(xDay); }** XmlElement xJob = xDoc.CreateElement("job"); xJob.SetAttribute("a", this.txtBoxProduct.Text); xJob.SetAttribute("b", this.txtBoxSize.Text); xJob.SetAttribute("c", this.txtBoxPrice.Text); xJob.SetAttribute("d", this.txtBoxAmount.Text); **xDay.AppendChild(xJob);** } private void choreForm\_FormClosing(object sender, FormClosingEventArgs e) { xDoc.Save(GetFileName()); } private string GetFileName() { return @"c:\\temp\\chores2.xml"; } }
gimme 5 if you like this!
-
Your form code should look like this :
public partial class choreForm : Form { XmlDocument xDoc = new XmlDocument(); public choreForm() { InitializeComponent(); } private void choreForm\_Load(object sender, EventArgs e) { FileInfo fi1 = new FileInfo(GetFileName()); if (fi1.Exists) { xDoc.Load(GetFileName()); } else { xDoc.AppendChild(xDoc.CreateElement("chores")); } } private void button1\_Click(object sender, EventArgs e) { **XmlElement xDay = xDoc.SelectSingleNode("descendant::day\[@title='" + this.dropdwnlst.selectedvalue + "'\]") as XmlElement; if (xDay == null) { xDay = xDoc.CreateElement("day"); xDay.SetAttribute("title", this.dropdwnlst.selectedvalue); xDoc.FirstChild.AppendChild(xDay); }** XmlElement xJob = xDoc.CreateElement("job"); xJob.SetAttribute("a", this.txtBoxProduct.Text); xJob.SetAttribute("b", this.txtBoxSize.Text); xJob.SetAttribute("c", this.txtBoxPrice.Text); xJob.SetAttribute("d", this.txtBoxAmount.Text); **xDay.AppendChild(xJob);** } private void choreForm\_FormClosing(object sender, FormClosingEventArgs e) { xDoc.Save(GetFileName()); } private string GetFileName() { return @"c:\\temp\\chores2.xml"; } }
gimme 5 if you like this!
-
Hello Coders, Im facing a problem building a C#.net code that will build me the following XML page:
<?xml version="1.0"?>
<chores>
<day title="some title">
<job a=".." b="text.." c="..text.." d="d..."/>
<job a=".." b="text.." c="..text.." d="d..."/>
<job a=".." b="text.." c="..text.." d="d..."/>
</day>//updating a new DAY tag
<day title="some title">
<job a=".." b="text.." c="..text.." d="d..."/>
<job a=".." b="text.." c="..text.." d="d..."/>
<job a=".." b="text.." c="..text.." d="d..."/>
</day>
//and again.. etc..<day title="some title">
<job a=".." b="text.." c="..text.." d="d..."/>
<job a=".." b="text.." c="..text.." d="d..."/>
<job a=".." b="text.." c="..text.." d="d..."/>
</day></chores>
I've tried hundreds of codes, nothing worked the way i need it. i will appreciate any help PLEASE. What im trying to do is the following: I have a page that has 4 textboxes, each one is supposed to save some value .. lets say a,b,c,d.. Another textbox is for the day attribute which is TITLE according to my example I need to add whenever i need a DAY. with it's attribute. and "jobs" like that example. whenever i need to make a new "DAY" i need it do be after the last one. i mean i need it to update the new <DAY> after the last one's and all of that i need it to come before the each time i update the xml file</chores> Please i'd really appreciate any help with this. im new to XML and im trying to make an XML management page for some project.If what i've said wasnt clear im ready to explain again. Please tell me what to do and how to do it, or if you have any samples for handling such an issue it will be great too
Hi again :-) thanks for your help with adding the XML data i need to ask you another question i've got my final xml file looking exactly as i need it to be
<?xml version="1.0" encoding="utf-8"?>
<chores>
<day label="111" title="asdasd">
<job a="2" b="22" c="22" d="22" />
<job a="2" b="22" c="22" d="22" />
</day>
</chores>im trying to Edit this file in a dataGrid but its not working my aspx page
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="EditTables.aspx.cs" Inherits="EditTables" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
<style type="text/css">
.style1
{
width: 100%;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<table class="style1">
<tr>
<td>
<br />
<br />
Edit your Products tables<br />
</td>
</tr>
<tr>
<td>
<asp:DataGrid ID="DataGrid1" runat="server" AllowPaging="True"
AllowSorting="True" CellPadding="4" ForeColor="#333333" GridLines="None"
oncancelcommand="DataGrid1_CancelCommand"
ondeletecommand="DataGrid1_DeleteCommand" oneditcommand="DataGrid1_EditCommand"
onpageindexchanged="DataGrid1_PageIndexChanged"
onupdatecommand="DataGrid1_UpdateCommand" AutoGenerateColumns="False"
Width="890px">
<AlternatingItemStyle BackColor="White" ForeColor="#284775" />
<Columns>
<asp:TemplateColumn HeaderText=" label">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "label")%>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox id="txtBoxTitle"
Text='<%# DataBinder.Eval(Container.DataItem, "label") %>'
runat="server" Height="21px" Width="80px"/>
</EditItemTemplate>
</asp:TemplateColumn><asp:TemplateColumn HeaderText="title"> <ItemTemplate&g
-
Hi again :-) thanks for your help with adding the XML data i need to ask you another question i've got my final xml file looking exactly as i need it to be
<?xml version="1.0" encoding="utf-8"?>
<chores>
<day label="111" title="asdasd">
<job a="2" b="22" c="22" d="22" />
<job a="2" b="22" c="22" d="22" />
</day>
</chores>im trying to Edit this file in a dataGrid but its not working my aspx page
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="EditTables.aspx.cs" Inherits="EditTables" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
<style type="text/css">
.style1
{
width: 100%;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<table class="style1">
<tr>
<td>
<br />
<br />
Edit your Products tables<br />
</td>
</tr>
<tr>
<td>
<asp:DataGrid ID="DataGrid1" runat="server" AllowPaging="True"
AllowSorting="True" CellPadding="4" ForeColor="#333333" GridLines="None"
oncancelcommand="DataGrid1_CancelCommand"
ondeletecommand="DataGrid1_DeleteCommand" oneditcommand="DataGrid1_EditCommand"
onpageindexchanged="DataGrid1_PageIndexChanged"
onupdatecommand="DataGrid1_UpdateCommand" AutoGenerateColumns="False"
Width="890px">
<AlternatingItemStyle BackColor="White" ForeColor="#284775" />
<Columns>
<asp:TemplateColumn HeaderText=" label">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "label")%>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox id="txtBoxTitle"
Text='<%# DataBinder.Eval(Container.DataItem, "label") %>'
runat="server" Height="21px" Width="80px"/>
</EditItemTemplate>
</asp:TemplateColumn><asp:TemplateColumn HeaderText="title"> <ItemTemplate&g
Actually, your
DataSet
contains twoTable
s : day and job, I guess that's where the problems start. I'm not very familiar with databinding, I would ask in another forum (as this whole question probably should have been :) ). The problem is not the attributes, the "title" and "label" attributes are acceptable to the binder. Also the other attributes ARE present as columns in table "job". So, post this question in the ASP or Web Development corner of CP. Cheers -
Actually, your
DataSet
contains twoTable
s : day and job, I guess that's where the problems start. I'm not very familiar with databinding, I would ask in another forum (as this whole question probably should have been :) ). The problem is not the attributes, the "title" and "label" attributes are acceptable to the binder. Also the other attributes ARE present as columns in table "job". So, post this question in the ASP or Web Development corner of CP. CheersHi i created a dropdownlist that shows all the ((day- label attribute)). by selecting one of those item, it will bind all that selected node's data in a datagrid. In other words, how can i bind the selected node from the dropdownlist to a datagrid that will bind its attributes?