Forum     

Go Back   Digit Technology Discussion Forum > Software > Software Q&A
Register FAQ Calendar Mark Forums Read

Software Q&A Having trouble with software? Find solutions here


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 26-09-2007, 04:03 PM   #1 (permalink)
Right Off the Assembly Line
 
Join Date: Sep 2007
Posts: 2
Default example of Inserting and Retrieving data from xml file


This is an example of Inserting and Retrieving data from xml file.

http://www.hanusoftware.com


private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here

if(!IsPostBack)
{
BindGrid();
}
}


private void BindGrid()
{
ds = new DataSet();
try
{
ds.ReadXml(@"c:\inetpub\wwwroot\WebApplication10\X MLFile1.xml");
DataGrid1.DataSource = ds;
DataGrid1.DataBind();
}
catch(Exception ex)
{
throw ex;
}
}




private void Button1_Click(object sender, System.EventArgs e)
{
ds = new DataSet();
try
{
ds.ReadXml(@"c:\inetpub\wwwroot\WebApplication10\X MLFile1.xml");
DataRow row = ds.Tables[0].NewRow();
row["name"]=txtName.Text;
row["fathersname"]=txtFName.Text;
row["address"]=txtAddress.Text;
ds.Tables[0].Rows.Add(row);
ds.WriteXml(@"c:\inetpub\wwwroot\WebApplication10\ XMLFile1.xml");
txtAddress.Text="";
txtFName.Text="";
txtName.Text ="";
BindGrid();
}
catch(Exception ex)
{
throw ex;
}



Software Development Company
hanusoft is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 26-09-2007, 04:54 PM   #2 (permalink)
I am Optimus Prime
 
navjotjsingh's Avatar
 
Join Date: Feb 2005
Location: Delhi, India
Posts: 1,919
Default Re: example of Inserting and Retrieving data from xml file

Why have you put link of your company here? Do you think this is a advertising forum? And that too post is in wrong section. You should have posted in tutorials section.
navjotjsingh is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
one of the file containing registry data.. 2kewl Hardware Q&A 4 10-07-2007 05:28 PM
Retrieving Firmware amit2005 QnA (read only) 3 12-03-2007 08:25 AM
data file in root Generic Superhero QnA (read only) 3 17-03-2006 10:08 PM
retrieving encrypted file Captain_Shailendra QnA (read only) 4 26-10-2005 12:02 PM
retrieving text from flash files futuristically_ancient QnA (read only) 6 06-06-2005 11:46 PM

 
Latest Threads
- by Niilesh
- by clinton
- by Tenida
- by abhidev

Advertisement




All times are GMT +5.5. The time now is 05:28 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2