摘要: SharePoint User Control 的开发有多种,现在主要介绍其中的两种。1.所有的代码都写在后辍名为ascx的文件中,如下图。 其优点为是容易更新到SharePoint网站, 不需要dll 编辑; 缺点:容易代码出错,没有智能检验,不可以跟踪代码:<%@ Control Language="C#" AutoEventWireup="true" ClassName="PosterscopeTopNavigation2" %><%@ Import Namespace="System.Data&qu 阅读全文
posted @ 2011-11-07 09:36 gzh4455 阅读(616) 评论(0) 推荐(0) 编辑
摘要: 1.做了开发这么久,居然不知道Viewstate是怎么用的!真悲剧……Viewstate主要是用来保留页面数据的。下面是某一种情况的用法。 private string MCategory { set { ViewState["MCategory"] = value; } get { if (ViewState["MCategory"] == null) ret... 阅读全文
posted @ 2011-11-04 21:18 gzh4455 阅读(205) 评论(0) 推荐(0) 编辑
摘要: public static string LogPath { get { string path = string.Empty; path = Environment.GetFolderPath(Environment.SpecialFolder.CommonProgramFiles) + @"\Microsoft Shared\web server extensions\12\LOGS\"; ... 阅读全文
posted @ 2011-11-04 10:58 gzh4455 阅读(204) 评论(0) 推荐(0) 编辑
摘要: SPSiteDataQuery 格式,其实下面的是很不规范的,只是让自己了解其真正的格式。以后会弄一个类来做这方面的工作<MatchingQuery> <Lists><List ID="2DF16909-AEE4-44F0-BBF5-B6E5F33F7AD6" /></Lists> <Webs Scope="SiteCollection" /> <Query> <OrderBy><FieldRef Name='ID'/></OrderBy 阅读全文
posted @ 2011-11-03 15:47 gzh4455 阅读(954) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2011-11-03 10:08 gzh4455 阅读(6) 评论(0) 推荐(0) 编辑
摘要: Need to Dispose:1. SPSite oSPsite = new SPSite(http://server)2. siteCollection = new SPSite(SPContext.Current.Web.Url))3. SPSite siteCollection = siteCollections.Add("sites/myNewSiteCollection", "DOMAIN\\User", roger.lamb@litwareinc.com)4. using (SPWeb web = new SPSite(SPContext. 阅读全文
posted @ 2011-11-02 16:52 gzh4455 阅读(327) 评论(0) 推荐(0) 编辑
摘要: private void button1_Click(object sender, EventArgs e) { string webURL = "http://richsharepoint:90/ApplicationManagement"; SPSecurity.RunWithElevatedPrivileges(delegate() { using (SPSite site =new SPSite (webURL)) { ... 阅读全文
posted @ 2011-11-01 12:00 gzh4455 阅读(364) 评论(0) 推荐(0) 编辑
摘要: 1. 右键项目选择属性,再选择“发布”选项。填好发布的地址, 安装地址,应用程序文件添加,一些组件的要求,更新选项,及产品的说明选项。上面的图是发布在一个sharepoint服务器上的,clickoncetest是一个虚拟目录,需要在richsharepoint服务器建立。发布文件存放的地址是放在一个共享文件上,以便域用户可以访问。2. 然后点击安装向导一步一步的填写,直至结束。3. 虚拟目录的建立。 打开IIS, 找到端口号为79的网站,右击建立一个名称为clickoncetest的虚拟目录,目录的地址指向 \\192.168.16.100\Anson\Publish\ClickOnceTe 阅读全文
posted @ 2011-10-28 14:53 gzh4455 阅读(792) 评论(0) 推荐(0) 编辑
摘要: 1. Right click on any of the tabs in your toolbox and click choose items.(Just make sure you have a version of adobe reader installed before starting.) When the dialog box pops up click the 'com components' tab then pick tha 'adobe pdfreader' com component. Click ok and you should no 阅读全文
posted @ 2011-10-11 22:50 gzh4455 阅读(1531) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2011-10-10 23:04 gzh4455 阅读(12) 评论(0) 推荐(0) 编辑