G
Guest
Hi,
This is probably a very simple question, but it's held me up for the last
hour or two:
I have a simple xml document and schema - all I am doing for the moment is
loading the xml into a dataset built from the schema (primaryDriver1 in
code), which has an associated dataview.
A textbox (TextBox1) is bound to a field within the dataview:
private void Page_Load(object sender, System.EventArgs e)
{
dataView1.AllowEdit = true;
primaryDriver1.ReadXml("C:\\temp\\OriginalPerson.Xml");
TextBox1.DataBind();
}
The member is displaying correctly after loading the page.
On pressing a button, I just want to write a new Xml file showing any change
the user may have made to the bound textbox:
private void Button1_Click(object sender, System.EventArgs e)
{
if(primaryDriver1.HasChanges())
{
DataSet ds = primaryDriver1.GetChanges();
ds.WriteXml("C:\\temp\\NewPerson.Xml");
primaryDriver1.AcceptChanges();
}
}
...but it just doesn't work. Where's the glaring hole in my knowledge?
Thanks in advance,
Aid.
This is probably a very simple question, but it's held me up for the last
hour or two:
I have a simple xml document and schema - all I am doing for the moment is
loading the xml into a dataset built from the schema (primaryDriver1 in
code), which has an associated dataview.
A textbox (TextBox1) is bound to a field within the dataview:
private void Page_Load(object sender, System.EventArgs e)
{
dataView1.AllowEdit = true;
primaryDriver1.ReadXml("C:\\temp\\OriginalPerson.Xml");
TextBox1.DataBind();
}
The member is displaying correctly after loading the page.
On pressing a button, I just want to write a new Xml file showing any change
the user may have made to the bound textbox:
private void Button1_Click(object sender, System.EventArgs e)
{
if(primaryDriver1.HasChanges())
{
DataSet ds = primaryDriver1.GetChanges();
ds.WriteXml("C:\\temp\\NewPerson.Xml");
primaryDriver1.AcceptChanges();
}
}
...but it just doesn't work. Where's the glaring hole in my knowledge?
Thanks in advance,
Aid.