惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
Google DeepMind News
Google DeepMind News
小众软件
小众软件
GbyAI
GbyAI
酷 壳 – CoolShell
酷 壳 – CoolShell
F
Fortinet All Blogs
博客园 - 三生石上(FineUI控件)
B
Blog
量子位
B
Blog RSS Feed
Vercel News
Vercel News
Blog — PlanetScale
Blog — PlanetScale
Last Week in AI
Last Week in AI
博客园 - 叶小钗
MongoDB | Blog
MongoDB | Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
爱范儿
爱范儿
Jina AI
Jina AI
C
Check Point Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
IT之家
IT之家
H
Hackread – Cybersecurity News, Data Breaches, AI and More
云风的 BLOG
云风的 BLOG

博客园 - DODONG

在现有PDF文件上添加水印 c#获取硬件信息 一个读写csv文件的C#类 . C#操作Excel文件(读取Excel,写入Excel) . 解决全球化时区问题 利用ReportViewer读取Reporting Service数据 [转]用反射来处理多字段提交 查询数据表中重复的记录 CVS文件导入SQL ComponentArt.Web.UI中AJAX TreeView 抽象工厂(Abstract Factory)模式 简单工厂(Simple Factory)模式 工厂方法(Factory Method)模式 用.NET创建Windows服务 关于&运算符和^ 初识WAP开发时.. C#操作XML XMLHttp客户端操作数据 asp.net网页智能导航SmartNavigation的替代实现方式
关于SharePoint中查询写法和注意的地方
DODONG · 2006-06-30 · via 博客园 - DODONG

                SPWeb web = SPControl.GetContextWeb(this.Context);
                SPList tasks 
= web.Lists[this.ListName];

                SPQuery query 
= new SPQuery();    
                query.Query 
=@"<Where><Contains>
                    <FieldRef Name='Title'/><Value Type='Text'>DODONG</Value>
                    </Contains></Where>
";

                SPListItemCollection items 
= tasks.GetItems(query);
                DataTable table 
= items.GetDataTable();
                dgCustomer1.DataSource 
= table;
                dgCustomer1.DataBind();

解释一下:其中<FieldRef Name='Title'/>,其实我PSP表里的字段为Name,在这里不能用<FieldRef Name='Name'/>,否则查询出错,dgCustomer1显示出来为:

ID Title Modified Created Author Editor Attachments LinkTitleNoMenu LinkTitle Age NickName RealName EMail
7 DODONG1 2006-6-30 15:07:31 2006-6-28 21:38:29 DODONG\Administrator DODONG\Administrator 0 DODONG1 DODONG1 290 Code Test Test Sample Test@gmail.com