I have a database driven menu control on my page. I'm populating it with database info that's been ultimately turned into an xmldatasource. The problem I'm having is once the menu control has been populated once, the results don't update if I give it a new value. I can use the back button or a link that get's me back to my selection page and then back to the menu - but either way it's just stays with the same initial information.
Here's the code I'm using to populate the XMLdatasource:
DataView dv = (DataView)SqlDataSource1.Select(DataSourceSelectArguments.Empty);
DataSet ds = new DataSet();
DataTable dt = dv.Table;
ds.Tables.Add(dt.Copy());
ds.DataSetName = "Menus";
ds.Tables[0].TableName = "Menu";
DataRelation relation = new DataRelation("ParentChild",
ds.Tables["Menu"].Columns["MenuID"],
ds.Tables["Menu"].Columns["ParentID"], true);
relation.Nested = true;
ds.Relations.Add(relation);
myXMLDataSource.Data = ds.GetXml();