sharepoint下载定位是什么?能否实现按考勤功能

我们在调试WebPart或者EventHandler之类的自定义组件时会遇到如何定位部署的网站集所对应的w3wp.exe进程的问题,方法如下 :&方法1.
&& 直接开始运行,输入cmd,再输入iisapp可以列出当前所有IIS中的WebApplication所对应的w3wp.exe进程,后面都有一个进程号标识,在VS中调试的时候附加到对应进程号的w3wp就对了,这样就不用在那么多w3wp中一个一个试。&方法2.
&& 每次挂接的时候选择所有的w3wp进程,此法有点暴力。&方法3.
& 针对Windows 2008 系统,由于不再支持iisapp.vbs,所以可以使用& %windir%\system32\inetsrv\appcmd.exe list wp& 来代替上述功能。至于 appcmd的具体知识,请参见
阅读(...) 评论()如何在SharePoint中实现Search功能_百度知道
如何在SharePoint中实现Search功能
提问者采纳
在Central Administration中,确定SharePoint server search service是开启的创建一个Search service application为你要search的站点创建一个content source在这个content source上运行Full crawl等crawl完成后,你就可以在那个站点上进行内部search了或者,你可以创建一个enterprise search center 来search
采纳率100%
其他类似问题
sharepoint的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁在软件测试中QC不是可以共享材料吗,为什么同时还要再用sharepoint,二者功能区别是什么?谢谢_百度知道
在软件测试中QC不是可以共享材料吗,为什么同时还要再用sharepoint,二者功能区别是什么?谢谢
提问者采纳
增加文档的共享,加入SharePoint除了有这些功能外、管理,主要还增加了,一些电子资料(文档)的保存、共享等功能、管理。个人愚见QC-Quality Center 这个吧。总结,感觉应该是只有数据的存储、统计等功能,对这个不够了解
提问者评价
谢谢!QC主要是test case管理,但是不能直接保存文档,而sharepoint就是有点像VSS。谢谢!
其他类似问题
sharepoint的相关知识
按默认排序
其他1条回答
这个倒不是很了解哦
您可能关注的推广回答者:
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁如何在SharePoint中实现Search功能_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
评价文档:
55页免费64页免费72页免费12页免费9页免费14页免费2页免费4页免费10页免费8页免费
喜欢此文档的还喜欢51页免费55页免费9页免费40页免费35页免费
如何在SharePoint中实现Search功能|简​单​介​绍​了​如​何​在​S​h​a​r​e​P​o​i​n​t​中​实​现​S​e​a​r​c​h​功​能​。
把文档贴到Blog、BBS或个人站等:
普通尺寸(450*500pix)
较大尺寸(630*500pix)
你可能喜欢SharePoint 2010 的SaveButton控件在保存数据后,会跳转到Url参数中的Source指定的页面,如要没有Source则跳转到List的默认页面。有的时候,需要在保存后能够给用户一个提示再进行跳转,这就要修改SaveButton的默认行为,当然最简单的方式就是继承SaveButton,然后进行客户端方式的跳转。幸运的是,SaveButton并非是定义为sealed的,所以继承是没有问题的,所以我定义了SaveButtonEx类。public class SaveButtonEx : Microsoft.SharePoint.WebControls.SaveButton
定义两个属性,定义是否为客户端跳转
/// &summary&
/// 是否是客户端跳转
/// &/summary&
public Boolean IsClientRedirect
/// &summary&
/// 跳转前的消息
/// &/summary&
public string RedirectMessage
关键的地方在于能够重写其被Click时候的行为,本质上SaveButton并不是直接继承的Button控件,而是通过在CreateChildControls中包装了Button控件实现的,所以要重写的方法是OnBubbleEvent,而不是OnClick.[SharePointPermission(SecurityAction.Demand, ObjectModel = true)]
protected override bool OnBubbleEvent(object source, EventArgs e)
bool flag = false;
if (e is CommandEventArgs)
CommandEventArgs args = (CommandEventArgs)e;
if (!(mandName == "SaveItem"))
SPListItem listItem = base.ItemContext.ListI
SPContentType contentType = ReflectorUtils.getPerperty&SPContentType&("ContentType", base.ItemContext);
if (((listItem != null) && (contentType != null)) && !ReflectorUtils.getPerperty&bool&("HasExternalDataSource", listItem))
listItem["ContentType"] = contentType.N
ReflectorUtils.InvokeMethod(listItem, "SetExtraInfo", new object[] { "ContentTypeId", contentType.Id.ToString(), "" });
catch (ArgumentException)
this.Page.Validate();
if (!this.Page.IsValid)
return true;
bool flag2 = false;
EventHandler onSaveHandler = base.ItemContext.FormContext.OnSaveH
if (onSaveHandler != null)
ReflectorUtils.InvokeMethod(typeof(Microsoft.SharePoint.WebControls.SaveButton), null, "ActionBeforeSaveItem", new object[] { ItemContext });
onSaveHandler(this, EventArgs.Empty);
flag2 = ((ReflectorUtils.getPerperty&object&("FieldValidationFailures", base.ItemContext.FormContext) == null)
&& (ReflectorUtils.getPerperty&object&("ItemValidationFailure", base.ItemContext.FormContext) == null))
&& (ReflectorUtils.getPerperty&object&("UniqueFieldsWithDuplicateValues", base.ItemContext.FormContext) == null);
else if (base.List.BaseTemplate == SPListTemplateType.Survey)
if (ReflectorUtils.getPerperty&object&("NextFieldName", base.ItemContext.FormContext) == null)
ReflectorUtils.InvokeMethod(listItem, "Checkin", null);
flag2 = true;
else if (base.ControlMode == SPControlMode.New)
ReflectorUtils.InvokeMethod(listItem, "Checkout", null);
flag2 = true;
flag2 = this.SaveItem();
flag2 = this.SaveItem();
flag = true;
if (!flag2)
string redirectUrl = base.RedirectU
ReflectorUtils.setPerperty("InSavePostBack", base.ItemContext, true, null);
//这里特别要测试一下会不会有异常
bool needToCreateWorkSpace = (bool)ReflectorUtils.InvokeMethod(typeof(Microsoft.SharePoint.WebControls.SaveButton), this, "NeedToCreateWorkSpace", new object[] { });
if (needToCreateWorkSpace)
ReflectorUtils.InvokeMethod(typeof(Microsoft.SharePoint.WebControls.SaveButton), this, "GotoMeetingWorkspaceCreationPage", new object[] { redirectUrl });
if (!base.ItemContext.IsPopUI)
if (base.ItemContext.List.BaseType == SPBaseType.DocumentLibrary)
SPFile file = ((SPListItem)base.Item).F
if (file != null)
redirectUrl = file.ServerRelativeU
SPFolder folder = ((SPListItem)base.Item).F
if (folder != null)
redirectUrl = folder.ServerRelativeU
redirectUrl = ReflectorUtils.getPerperty&string&("RootFolderUrl", base.ItemContext.List);
if (!this.IsClientRedirect)
SPUtility.Redirect(redirectUrl, SPRedirectFlags.UseSource, this.Context);
this.Context.Response.Write(
"&script type='text/javascript'&alert('" + this.RedirectMessage +
"');window.location.href='" + redirectUrl + "';&/script&");
this.Context.Response.Flush();
this.Context.Response.End();
if ((listItem != null) && (listItem.File != null))
string serverRelativeUrl = listItem.File.ServerRelativeU
this.Context.Response.Write(string.Format(CultureInfo.InvariantCulture, "&script type='text/javascript'&\r\n
retVal = {{}};\r\n
retVal['newFileUrl'] = \"{0}\";\r\n
mitPopup(retVal);\r\n
&/script&", new object[] { serverRelativeUrl }));
this.Context.Response.Write("&script type='text/javascript'&mitPopup();&/script&");
this.Context.Response.Flush();
this.Context.Response.End();
当然,这里面的大部分代码我只是从反编译的代码中复制过来的.其中涉及到一些internal的private的方法及属性,需要使用反射的方式进行调用。
对于跳转的方法其实就很简单了,就是判断是否为客户端跳转,是的话就注册一段脚本,输出alert以及通过window对象进行跳转。下面是这段代码if (!this.IsClientRedirect)
SPUtility.Redirect(redirectUrl, SPRedirectFlags.UseSource, this.Context);
this.Context.Response.Write(
"&script type='text/javascript'&alert('" + this.RedirectMessage +
"');window.location.href='" + redirectUrl + "';&/script&");
this.Context.Response.Flush();
this.Context.Response.End();
下面是反射辅助类的代码using S
using System.Collections.G
using System.L
using System.T
using System.R
namespace Only.SPLibraryExtend.Utils
/// &summary&
/// 反射工具
/// &/summary&
public class ReflectorUtils
public static void setField(Type type,string fieldName, object o, object value)
FieldInfo fi = type.GetField(fieldName, BindingFlags.Instance | BindingFlags.NonPublic);
fi.SetValue(o, value);
public static void setField(string fieldName,object o,object value)
setField(o.GetType(), fieldName, o, value);
public static T getField&T&(Type type,string fieldName, object o)
T result = default(T);
FieldInfo fi = type.GetField(fieldName, BindingFlags.Instance | BindingFlags.NonPublic);
result = (T)fi.GetValue(o);
public static T getField&T&(string fieldName, object o)
return getField&T&(o.GetType(), fieldName, o);
/// &summary&
/// 获取反射的属性
/// &/summary&
/// &typeparam name="T"&&/typeparam&
/// &param name="property"&&/param&
/// &param name="o"&&/param&
/// &returns&&/returns&
public static T getPerperty&T&(string property, object o)
Type t = o.GetType();
PropertyInfo pi = t.GetProperty(property, BindingFlags.GetProperty | BindingFlags.Instance | BindingFlags.NonPublic);
result = (T)pi.GetValue(o, null);
public static void setPerperty(string property, object o,object value,object[] index)
Type t = o.GetType();
PropertyInfo pi = t.GetProperty(property,
BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.SetProperty);
pi.SetValue(o, value, index);
public static object InvokeMethod(object target, string methodName, object[] parameters)
return InvokeMethod(target.GetType(), target, methodName, parameters);
/// &summary&
/// 反射调用非重载方法
/// &/summary&
/// &param name="t"&&/param&
/// &param name="target"&&/param&
/// &param name="methodName"&&/param&
/// &param name="parameters"&&/param&
/// &returns&&/returns&
public static object InvokeMethod(Type t, object target, string methodName, object[] parameters)
MethodInfo method = null;
if (target == null)
method = t.GetMethod(methodName, BindingFlags.InvokeMethod | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static);
method = t.GetMethod(methodName, BindingFlags.InvokeMethod | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
var result = method.Invoke(target, parameters);
/// &summary&
/// 反射调用重载的方法
/// &/summary&
/// &param name="t"&&/param&
/// &param name="target"&&/param&
/// &param name="methodName"&&/param&
/// &param name="parameters"&&/param&
/// &param name="parameterTypes"&&/param&
/// &returns&&/returns&
public static object InvokeMethod(Type t, object target, string methodName, object[] parameters, Type[] parameterTypes)
MethodInfo method = null;
if (target == null)
method = t.GetMethod(methodName, BindingFlags.InvokeMethod | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static, Type.DefaultBinder, parameterTypes, null);
method = t.GetMethod(methodName, BindingFlags.InvokeMethod | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance, Type.DefaultBinder, parameterTypes, null);
var result = method.Invoke(target, parameters);
这个控件的运行效果,请参见:
Technorati 标签: ,&
阅读(...) 评论()

我要回帖

更多关于 sharepoint教程 的文章

 

随机推荐