This is the XML file:
<?xml version="1.0" encoding="utf-8" ?>
<Books>
<Book id="1">
<Author>Mark</Author>
<Publisher>Sams</Publisher>
</Book>
</Books>
This is the code to extract the attribute:
XmlTextReader textReader = new XmlTextReader("D:\\books.xml");
textReader.MoveToElement();
string au = textReader.GetAttribute("Auther");
Uname.Text = au;