Hi members,
I have question.
How to fetch the data in text boxes (fields) which is already stored data in XML file by clicking uploaded button control in the form by using asp.net MVC or jQuery?
For example design:-
there are three textboxes(fields)
Name:here textbox(<input type="text" /> it is in html control)
Company: textbox
City: textbox
here buttons under these textboxes
submit uploadfile
When I click on the uploadfile then what the XML file has data then I would like to fetch the data in text box fields.
example of XML file:--
<FAddress id="1">
<Name> Fedex</Name>
<Company>Processweaver</Company>
<City> Hyderabad</City>
</FAddress>
so please give me reply as soon as possible
Thank you
What I have tried:
public FromAddress GetLoad(string strpath)
{
FromAddress ad = new FromAddress();
XmlDocument objdoc = new XmlDocument();
objdoc.Load(strpath);
XmlNodeList xlist = objdoc.GetElementsByTagName("FAddress");
foreach (XmlNode node in xlist)
{
ad.Name = node.ChildNodes[0].InnerText;
ad.Company = node.ChildNodes[1].InnerText;
ad.City = node.ChildNodes[2].InnerText;
}
return ad;
}