上一页 1 ··· 13 14 15 16 17
摘要: 代码如下:Calling Web Serviceusing System;using System.Runtime.InteropServices;using System.Web.UI;namespace WebPartCollection{ [Guid("d2b37a6c-650c-4ef4-962c-85297f15b0b5")] public class AsyWebServiceWebPart : System.Web.UI.WebControls.WebParts.WebPart, ICallbackEventHandler { public Asy... 阅读全文
posted @ 2011-10-04 22:16 gzh4455 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 1. 判断模式:设计模式Design Model protected override void Render(HtmlTextWriter writer) { bool isDesign = this.WebPartManager != null && this.WebPartManager.DisplayMode != WebPartManager.BrowseDisplayMode; if (isDesign) { writer.Write("<div style=... 阅读全文
posted @ 2011-10-04 15:58 gzh4455 阅读(340) 评论(0) 推荐(0) 编辑
摘要: 下面代码是实现一个Dropdown,同时实现其同步变化。代码如下:Complex Propertyusing System;using System.Runtime.InteropServices;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.ComponentModel;using System.Collections;namespace WebPartCollection{ [Guid("cf18e6af-3ab5- 阅读全文
posted @ 2011-10-04 15:48 gzh4455 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 1. Create ListView Code public static bool CreateList(SPWeb web,string listName,string strDescription,SPListTemplateType type,bool IsOnQuickLaunch) { bool result = false; try { web.AllowUnsafeUpdates = true; Guid newListId... 阅读全文
posted @ 2011-10-04 14:56 gzh4455 阅读(263) 评论(0) 推荐(0) 编辑
摘要: Webpart引用UserControl有两种方法:1. 引用QuickPart2. 自己开发出一个WebPart暴露一个引用地址属性。代码如下:View Code using System;using System.Runtime.InteropServices;using System.Web.UI;using System.Web.UI.WebControls.WebParts;namespace WebPartCollection{ [Guid("1c7e7f5f-c4d6-4628-8785-3804bc0f5c85")] public class UserCon 阅读全文
posted @ 2011-10-04 14:23 gzh4455 阅读(266) 评论(0) 推荐(0) 编辑
摘要: WebPart多语言的实现:WPResource.csView Code using System;using System.Web.UI.WebControls.WebParts;using Microsoft.SharePoint;using System.ComponentModel;using System.Web;namespace WebPartCollection.Common{ public static class WPResource { const string RESOURCE_FILE_NAME = "Anson"; /// ... 阅读全文
posted @ 2011-10-04 14:03 gzh4455 阅读(374) 评论(0) 推荐(1) 编辑
摘要: 这个实例主要是建义一书中的开发实例!字段类型由3部分组成:继承于SPField的字段类,继承于BaseRenderControl的字段呈现控件类和字段的的配置文件。下面是这个项目的结构:EmailFieldControls.csView Code using System;using System.Collections.Generic;using System.Linq;using System.Text;using Microsoft.SharePoint;using Microsoft.SharePoint.WebControls;using System.Web;using Syste 阅读全文
posted @ 2011-10-02 16:41 gzh4455 阅读(339) 评论(0) 推荐(0) 编辑
摘要: jQuery扩展:jquery.tinywatermark-3.1.0.js文件代码:(function($) { $.fn.watermark = function(c, t) { var e = function(e) { var i = $(this); if (!i.val()) { var w = t || i.attr('title'), $c = $($("<div />").append(i.clone()).html().replace(/type=\"?password\"?/, 'type=&qu 阅读全文
posted @ 2011-09-29 13:18 gzh4455 阅读(9358) 评论(0) 推荐(0) 编辑
摘要: SharePoint的EventHandler主要有Web Level,List Level,List Item Level,Email几种。SharePoint的event handler主要是继承SPWebEventReceiver, SPEmailEventReceiver, SPListEventReceiver和SPItemEventReceiver类去实现其中相应的方法来完成我们的需求。ModifiedPermissions:using System;using System.Collections.Generic;using System.Text;using Microsoft 阅读全文
posted @ 2011-09-29 10:33 gzh4455 阅读(320) 评论(0) 推荐(0) 编辑
摘要: Webpart出错,无法打开页面,contents=1 ,会转到webpart管理页面,把出问题的删掉在URL后面加入“?&toolpaneview=2”打开设计页或者加“DisplayMode=Design” 阅读全文
posted @ 2011-09-27 22:57 gzh4455 阅读(169) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17