12 2010 档案

摘要:面演示了用户控件调用父页面SetLaeble方法。父页面类型用反射的方法获取,这避免了不同页面调用同样时,需要类型转换的问题(不用写很多case了:))。当然还有一种方法是父页面去实现一个接口,即去实现SetTextBox方法,uc把this.Page转成这个接口就可以了。用户控件: 代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--privatevoidButton1_Click(objectsender,System.EventArgse) 阅读全文
posted @ 2010-12-30 10:24 StarWang 阅读(300) 评论(0) 推荐(0) 编辑
摘要:以前做项目,很少去关注Convert、Parse、TryParse、int 等区别,感觉自己哪个方式用的顺手就用哪个方式,最近才发现,原来这些细节挺重要的;Convert.ToInt32 与 int.Parse 较为类似,实际上 Convert.ToInt32 内部调用了 int.Parse: * Convert.ToInt32 参数为 null 时,返回 0; * int.Parse 参数为 null 时,抛出异常。 * * Convert.ToInt32 参数为 "" 时,抛出异常; * int.Parse 参数为 "" 时,抛出异常。 * * Convert.ToInt32 可以转换的 阅读全文
posted @ 2010-12-30 10:12 StarWang 阅读(332) 评论(0) 推荐(1) 编辑
摘要:最近在作MOSS2010的开发部署,想migrate之前MOSS2007的site到MOSS2010上,下面介绍一下笔者实践的迁移过程。首先说一下,当我们在MOSS2007上将一个site或者list保存成template文件(.stp文件),然后将它upload到MOSS2010的template library.由此来在MOSS2010上生成site或者list是行不通的,MOSS2010会报一个错,不支持WSS3.0生成的stp文件。我们这里采取了恢复Content database的方法来迁移。下面开始详细过程: 前提:正常安装完成MOSS2010Step1:备份MOSS2007上的需 阅读全文
posted @ 2010-12-27 15:08 StarWang 阅读(242) 评论(0) 推荐(1) 编辑
摘要:很早之前就一直想把SharePoint 的导航替换成自己想要的效果,之前也看了不少相关文章,这几天闲着没事就开始尝试做了下,经过不断尝试,终于做出来了,哈哈。。。由于SharePoint 2007/2010的网站导航基本上基于标准的ASP.NET SiteMap模型,所以只要你对ASP.NET SiteMap有一些了解,就能创建一个自定义的导航菜单。在开始之前,让我们先从网上随便找一个样子比较cool的菜单控件。在下面的示例中,我选择使用Smooth Navigation Menu这个jQuery控件,来渲染出SharePoint网站的顶部导航菜单。将Smooth Navigation Men 阅读全文
posted @ 2010-12-27 14:02 StarWang 阅读(409) 评论(0) 推荐(0) 编辑
摘要:参考资料:http://www.sharepointings.com/sharepoint-2010-open-modal-dialog-from-editcontrolblock/http://www.a2zmenu.com/SharePoint/SharePoint%202010%20Model%20Dialog.aspxVisual Studio 2010 makes it really easy to create and upload Features. Using these new Features makes it easy to add actions to menus. O 阅读全文
posted @ 2010-12-23 19:04 StarWang 阅读(303) 评论(0) 推荐(1) 编辑
摘要:"If you don’t want the control to create and destroy instances, you can override the default behaviour capturing the Creating and Disposing events. If you supply a value for the argument ObjectInstance, the control will use this object instead of creating a new instance. If you set the Cancel argume 阅读全文
posted @ 2010-12-23 17:21 StarWang 阅读(255) 评论(1) 推荐(0) 编辑
摘要:需求是一个不固定条件的查询,要组合三个不固定的条件,就是说可能是一个,2个或者3个(即模糊查询);起初,我通过视图把我所需要的用视图的filter进行构造,当时我构造了两个条件,通过工具找到该CAML 语句,语句如下:[代码]结果运行出来出现了如下Error: One or more field types are not installed properly. Go to the list settings page to delete these fields.于是我Google了下,很多人也碰到这个问题,http://social.msdn.microsoft.com/Forums/en 阅读全文
posted @ 2010-12-22 17:15 StarWang 阅读(2827) 评论(0) 推荐(0) 编辑
摘要:1.Geq(=) The Geq element is an arithmetic operator that means "greater than or equal to." It can be used within a Where element in a view definition.Query Where Or IsNull FieldRef Name="Expires" / /IsNull Geq FieldRef Name="Expires" / Value Type="DateTime" Today / /Value 阅读全文
posted @ 2010-12-20 21:54 StarWang 阅读(1335) 评论(0) 推荐(0) 编辑
摘要:name of any SharePoint project item contains parentheses, its solution fails on deployment with an error. Error MessageError occurred in deployment step 'Add Solution': Failed to extract the cab file in the solution.ResolutionTo work around this problem, remove any parentheses in the names of ShareP 阅读全文
posted @ 2010-12-17 11:15 StarWang 阅读(803) 评论(0) 推荐(0) 编辑
摘要:问题一:无法显示分页的页码。很多朋友很奇怪明明已经设置如下的代码oGrid.AllowPaging = true; oGrid.PageSize = 2; oGrid.PageIndexChanging +=new GridViewPageEventHandler(oGrid_PageIndexChanging);但是页面上无法显示页码。这个是SharePoint 自己的问题,我们需要加入下面一行代码Controls.Add(oGrid); oGrid.PagerTemplate = null;//这行就是要加的代码,顺序很重要,一定要在Controls.Add之后,DataBind();之前 阅读全文
posted @ 2010-12-17 11:11 StarWang 阅读(258) 评论(0) 推荐(0) 编辑
摘要:Today I was trying to delete a corrupt Web Application to clean out my Web Application List in Central Administration.The following error occured:An object in the SharePoint administrative framework could not be deleted because other objects depend on it.Step 1My first step was to run the SharePoint 阅读全文
posted @ 2010-12-08 17:30 StarWang 阅读(453) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示