TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
César Goulart
NA
46
2.7k
conecting c# to xml
Feb 9 2020 5:22 PM
Hi,
I have this code:
and i want the informatiom that i give. ('Pink') be given by a textbox
How can i do it? thanks
private
void
button1_Click(
object
sender, EventArgs e)
{
XDocument doc = XDocument.Load(@
"C:\Work\stores.xml"
);
var xpath =
"//store/Color[text() ='Pink']"
;
var result = ((IEnumerable)doc.XPathEvaluate(xpath)).Cast<XElement>().FirstOrDefault();
textBox1.Text = result.Value;
}
Reply
Answers (
2
)
How to open the document in modal
Passing Json to Javascript Array on aspnet Page Load