首页 新闻 赞助 找找看

SharePoint SPQuery

0
[已关闭问题] 关闭于 2009-08-08 17:08

代碼如下:請問 “ query.Query = string.Format("<Where><BeginsWith><FieldRef Name='Title' /><Value Type='Text'>'c'</Value></BeginsWith></Where>");”

查詢出的是哪些值?沒分了,不好意思。

 using (SPSite site = new SPSite("http://10.148.8.77:2000/Pages/Default.aspx"))
                {
                    using (SPWeb web =site.AllWebs["Docs"])
                    {
                        SPList list = web.Lists["文件"];

                        SPQuery query = new SPQuery();
                        query.Query = string.Format("<Where><BeginsWith><FieldRef Name='Title' /><Value Type='Text'>'c'</Value></BeginsWith></Where>");

                        foreach (SPListItem item in list.GetItems(query))
                        {
                            s.Add(item.Title);
                        }
                    }
                }

小生不才的主页 小生不才 | 初学一级 | 园豆:0
提问于:2009-08-08 16:14
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册