Intersoft WebDesktop Documentation
How-to: Save and Load structure programmatically
Send Feedback
Intersoft WebDesktop > WebToolBar > Tutorials > How-to: Save and Load structure programmatically

Glossary Item Box

WebToolBar provides method to save and load structure from xml file.

This topic will show you how to save and load structure programmatically.

To save and load structure programmatically

  1. Create two ASP.NET button controls.
  2. Place the following code in the first button Click event to save WebToolBar's structure.
    C# Copy Code
    protected void WebButton1_Clicked(object sender, ISNet.WebUI.WebDesktop.WebButtonClickedEventArgs e)
    {
       WebToolBar1.SaveCommandsStructureToXml(Server.MapPath("SampleStructure.xml"));        
    }
    

  3. Place the following code in the second button Click event to load WebToolBar's structure.
    C# Copy Code
    protected void WebButton2_Clicked(object sender, ISNet.WebUI.WebDesktop.WebButtonClickedEventArgs e)
    {
       WebToolBar1.LoadCommandsStructureToXml(Server.MapPath("SampleStructure.xml"));        
    }
    
© 2012 Intersoft Solutions Corp. All Rights Reserved.