{
WRCreateView.Views objCreateViews = new CreateViews.WRCreateView.Views();
objCreateViews.Url = "http://Sitename.net/sites/SiteCol/_vti_bin/views.asmx";
NetworkCredential netcred = new NetworkCredential("MyUserName", "MyPassword", "MyDomain");
objCreateViews.Credentials = netcred;
string strQuery = "
string strRowLimit = "100";
string strViewFields = "
System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
System.Xml.XmlNode ndQuery = xmlDoc.CreateNode(XmlNodeType.Element, "Query", "");
System.Xml.XmlNode ndRowLimit = xmlDoc.CreateNode(XmlNodeType.Element, "RowLimit", "");
System.Xml.XmlNode ndViewFields = xmlDoc.CreateNode(XmlNodeType.Element, "ViewFields", "");
ndQuery.InnerXml = strQuery;
ndRowLimit.InnerXml = strRowLimit;
ndViewFields.InnerXml = strViewFields;
XmlNode retNode = objCreateViews.AddView("{794D4A54-960D-2322-1234-B6A672927FB7}", strCategory, ndViewFields, ndQuery, ndRowLimit, "HTML", false);
//XmlNode xmln = objCreateViews.GetView("{794D4A54-960D-47FA-1234-B6A672927FB7}", "{44F80DED-1235-485B-9B47-3EB2FDD797B1}");
}
No comments:
Post a Comment