以下是我的代码,有问题的,谢谢
if(ViewState["AllXml"]==null)
{
     //获取当前模块Xml
     Centralism.UserService obj=new Centralism.UserService();
     docUserApp=new XmlDocument();
     docUserApp.LoadXml(obj.getUserRight("ElecFileCenter",ldapStr,true,"").OuterXml);
     ViewState["AllXml"]=docUserApp;
}
else
{
    docUserApp=(XmlDocument)ViewState["AllXml"];
}