Hi,
I have an Xml file in which i am storing the usernames and password and
some other user details. The file contains data as shown below..
<?xml version="1.0" encoding="utf-8"?>
<RoleTables xmlns="http://tempuri.org/UserPass.xsd">
<Table>
<username>Arun</username>
<password>jgEEnsYs+ZY=</password>
<Email>ar**@yahoo.com</Email>
</Table>
<Table>
<username>sweta</username>
<password>A/JvqRbKGes=</password>
<Email>si**@ere.com</Email>
</Table>
</RoleTables>
Now I have an aspx page where i am displaying the list of existing
users(which i am getting from this xml file) and displaying as a bound
column of a datagrid and each of these users has a coressponding Edit and
Delete links which are the Hyperlink columns of the DataGrid.
now, My problem is how do i get the corrresponding user information from
this xml file for the userhas been click whose Edit ink ed.
What I have done is in the Hyperlink column attribute i have set
DataNavigateUrlFormatString="AddEditUserAcnts.aspx ?username={0}
And in the PageLoad Event of AddEditUserAcnts.aspx page i am trying to get
to this particular users node.
Please can you tell me how can I get to this particular users node.
I tried using this in my AddEditUserAcnts.aspx page
string userstring = Request.QueryString["username"];
XmlDocument doc = new XmlDocument();
string UserPath = Server.MapPath("UserPass.xml");
doc.Load(UserPath);
XmlNode root = doc.DocumentElement;
XmlNode table = root.SelectSingleNode("descendant::Table[ @user='Arun' ]");
But table always points to null...i.e. I am not able to get to that
particular users node.
Any advice would be helpful...
Thanx
Smita.