Edit XML Files Using ASP.NET TreeView Control
page 1 of 5
Published: 10 Aug 2009
Unedited - Community Contributed
Abstract
The article will show how to edit an XML file using the ASP.NET TreeView control and the TextBox control. The article contains screen shots of the application and fully functional code. This application will be helpful for programmers who wish to implement administrative sections where the configurations of web applications are in XML files.
by Nishanth Nair
Feedback
Average Rating: 
Views (Total / Last 10 Days): 8964/ 235

Introduction

This article explains how to use the ASP.NET TreeView control to edit an XML file which resides on the same server. The origin of this article starts when there was a demand from the end users to create an Admin section to edit a configuration XML file for an internal ASP.NET application. The functionalities of the application were completely configurable and the configuration values were kept in this particular XML file. To edit this XML file, the admins had to login in to the server which hosted the application and edit the XML file using a text editor which was tedious.

After some research I developed a control panel for the application which uses TreeView Control and a TextBox control to edit the configuration XML File.


View Entire Article

Article Feedback

Title:  
Name:  
Url: ( Optional )
Comment:  
Please add 4 and 6 and type the answer here:

User Comments

Title: Re: Good example but need little change.   
Name: Nishanth Nair(Author)
Date: 8/11/2009 10:56:04 PM
Comment:
Nirdesh,
Since we are editing the XML file, the file must be within the virtual directory. Otherwise the asp.net worker process will not have permission to edit files outside the virtual directory. In this example, the XML file is a data/config file of the web application which is inside the Virtual directory.

One thing you can do is to upload the XML file from the client, download it in a temp directory, edit it and then make it available for the user to download. Feel free to modify my code and implement in a more user friendly way!!
Title: Good example but need little change.   
Name: Nirdesh Puri
Date: 8/11/2009 6:11:59 PM
Comment:
This is very good example. But its required little change. 1) It have to take files from outside the project.
2) It should be browse the files also and select.

Product Spotlight
Product Spotlight 






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2009 ASPAlliance.com  |  Page Processed at 11/22/2009 2:32:51 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search