Menu control not updating with new info...

Last post 10-29-2009 10:06 AM by megatherian. 1 replies.

Sort Posts:

  • Menu control not updating with new info...

    10-29-2009, 9:44 AM
    • Member
      8 point Member
    • megatherian
    • Member since 07-16-2009, 12:42 PM
    • Posts 22

    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();



  • Re: Meu control not updating with new info...

    10-29-2009, 10:06 AM
    Answer
    • Member
      8 point Member
    • megatherian
    • Member since 07-16-2009, 12:42 PM
    • Posts 22

    nevermind, found the answer, I needed to set my xmldatasource caching to false.  I figured it'd be something simple, I just couldn't find the answer anywhere.

Page 1 of 1 (2 items)
Microsoft Communities