<?xml version="1.0" encoding="utf-8" ?> <catalog> <book id="bk101"> <author>Gambardella, Matthew</author> <title>XML Developer's Guide</title> <genre>Computer</genre> <price>44.95</price> <publish_date>2000-10-01</publish_date> <description> An in-depth look at creating applications with XML. </description> </book> ...............
protected void Button2_Click(object sender, EventArgs e) { string s=FileUpload1.FileName.ToString(); DataSet ds = new DataSet(); ds.ReadXml(Server.MapPath(s)); Int32 i = increment(); DataTable dt = ds.Tables[0]; if (i <= dt.Rows.Count) { DataRow dr; dr = dt.Rows[i - 1]; TextBox2.Text=dr[0].ToString(); } } private int increment() { string strInput = Hidint; int incrValue = Convert.ToInt32(strInput); incrValue += 1; Hidint = incrValue.ToString(); return incrValue; }
TextBox1.Text = File.ReadAllText(filePath);//path your xml file
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)