protected void Page_Load(object sender, EventArgs e) { Control tblSourceCode = Page.Master.FindControl("tblSourceCode") as Control; if (tblSourceCode != null) { tblSourceCode.Visible = false; } if (!IsPostBack) { XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(Page.MapPath("~/App_Data/Demos.xml")); byte columnCount = 3; if (xmlDoc.DocumentElement["ColumnCount"] != null && byte.TryParse(xmlDoc.DocumentElement["ColumnCount"].Value, out columnCount)) { ASPxSiteMapControl1.ColumnCount = Convert.ToByte(columnCount); } } ASPxSiteMapDataSource1.Provider = SiteMapProvider; ASPxSiteMapControl1.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { SiteMapDataSource dataSource = GenerateSiteMapHierarchy(AccessDataSource1); dataSource.ShowStartingNode = false; ASPxSiteMapControl1.DataSource = dataSource; ASPxSiteMapControl1.DataBind(); }
public override void EnsureSiteMapIsBound() { base.EnsureSiteMapIsBound(); ASPxSiteMapControl1.DataBind(); }