XmlNode eleDestNodeLists;
string FilePath = Request.PhysicalApplicationPath + @"Configuration\" + "UserInfo.xml";
XmlDocument docSource = new XmlDocument();
docSource.Load(FilePath);
Int32 assetid = Convert.ToInt32(Session["assetid"].ToString());
string sbookCode = Session["bookCode"].ToString();
eleDestNodeLists = docSource.SelectSingleNode("/UserInfo/Asset[@assetid='" + assetid + "' and @BookCode='" + sbookCode.ToString() + "']");
foreach (XmlNode xn in eleDestNodeLists.ChildNodes)
{
string abbreviation = xn.Attributes.GetNamedItem("abbreviation").Value;
string id = xn.Attributes["id"].Value;
ddlRole.Items.Add(new ListItem(abbreviation, id));
Page.ClientScript.RegisterStartupScript(typeof(Page), "FillUserName", "setTimeout(\"FillUserName()\",1000);", true);
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment