日期:2014-05-17 浏览次数:20466 次
public HDIP(string hdip)//此处如何来获得hdip的值,因为下一个buttonclick需要用到hdip的值
{
try
{
string path = HttpContext.Current.Server.MapPath(MachineIpfilepath);
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(path);
XmlNodeList nodeList = xmlDoc.SelectSingleNode("Machineip").ChildNodes;
foreach (XmlNode xn in nodeList)
{
XmlElement xe = (XmlElement)xn;
if (xe.Name == "HdCamera")
{
hdip = xe.SelectSingleNode("ip").InnerText.Trim();
break;
}
}
}
catch
{
}
finally
{
} //获得HdCameraIp
}