this is the below code i have tried to retrive data from XML file
CODE BEHIND
protected void btnviewdata_Click(object sender, EventArgs e)
{
GridView1.Visible = true;
SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=TNVKP_8;Integrated Security=True");
con.Open();
DataSet reportData = new DataSet();
reportData.ReadXml(Server.MapPath("XMLFILENAME.xml"));
GridView2.DataSource = reportData;
GridView2.DataBind();
con.Close();
}
ASPX code
Here in this PIPCODE label i want take data from the sql server
if XML pipno equal my table pipno then i want reteive the equivalent code the pipno.
and how can i write the query to select the pipcode from the table because i want to take the pipno from xml and match with sql then i want to select th equivalent pipcode from table and should view in the last column of grid view.
If pipcode is available the remark equal to OK
if pipno not available then remark equal to NOT IN DB like that
post solution for this
Thanks in advance
Replies
Know the answer? Post it — somebody with the same question will find it here.