摘要: 场景:2012年在做广州地铁协同办公项目时,客户觉得明文的数据库链接用户密码配置在web.config里面不安全;其实.NET里的web.config在IIS中有所限制,对安全性还是有保障的。但是客户既然有这样稍微“变态”的需求,那我们就考虑怎么去把它实现吧。存在的技术难点:(1)web.confi... 阅读全文
posted @ 2015-05-29 23:54 KenmuHuang 阅读(6427) 评论(0) 推荐(0)
摘要: 在Web开发中,我们常常会涉及到需要获取Get方式URL中的参数键值的情况,这里简单介绍三种方法:第一种:常用的做法有使用JavaScript获取location.href后用正则表达式匹配获取此URL的所有键值对;也可以通过以“&”为分隔符进行分隔后存储在对象中,然后获取对象中的键值对,如下例子:... 阅读全文
posted @ 2015-05-29 23:21 KenmuHuang 阅读(2654) 评论(0) 推荐(0)
摘要: 有时候,我们需要控制文本框,只允许用户输入可以为负数的浮点值,例如:-23.563;而不允许出现23.563qq这样的值。这里我们还是看代码吧,用正则表达式很容易就能实现以上需求:前台页面:1 后台页面:1 //注意负号、点号都需要使用双个斜杠转换,单引号单个斜杠转换2 //其实以下的代码直接在前台... 阅读全文
posted @ 2015-05-29 23:02 KenmuHuang 阅读(5851) 评论(0) 推荐(0)
摘要: 建议不要用CODE-39码,改用CODE-128码;CODE-39码密度比较低,条码数字内容太多,导致条码太长,缩短长度就只能减小X尺寸,造成识读困难;CODE-128码密度高,相同的数字生成条码更短。你可以对比一下图中的两个条码,上面是CODE-39,下面是CODE-128,相同的内容:解决方案:... 阅读全文
posted @ 2015-05-29 18:28 KenmuHuang 阅读(2010) 评论(2) 推荐(2)
摘要: 使用ClientScript.GetCallbackEventReference实现局部刷新是.NET支持的一种前后台代码调用的方式;其实实现局部刷新这样方式有很多种,最经典也常用的莫过于jQuery封装好的异步调用方法(ajax, get, getJSON, post),这里就不去多加比较,毕竟都... 阅读全文
posted @ 2015-05-29 17:50 KenmuHuang 阅读(1232) 评论(0) 推荐(0)
摘要: 场景:当URL中存在“,*,%,&,:,/”特殊字符时,页面会抛出A potentially dangerous Request.Path value was detected from the client异常。原因:是ASP.NET默认的拦截机制,保证页面URL传输的一定安全性。解决方案有两种:... 阅读全文
posted @ 2015-05-29 17:36 KenmuHuang 阅读(8272) 评论(0) 推荐(0)
摘要: 此篇随笔是2013年根据项目需求开发记录的,不一定符合大众口味,只需了解开发思路,毕竟解决方案多种多样。下面简单说说需求点吧:(1)通过下拉列表可以选择一个DataSet(数据集),一个DataSet存在可以互相关联的多个DataTable(数据表格),DataTable数据来源于数据库视图;SQL... 阅读全文
posted @ 2015-05-29 17:08 KenmuHuang 阅读(2625) 评论(0) 推荐(1)
摘要: CSVHelper.cs内容: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Web; 6 using System... 阅读全文
posted @ 2015-05-29 16:32 KenmuHuang 阅读(5267) 评论(0) 推荐(0)
摘要: 方法定义: 1 public static void InitDropDownList(DropDownList ddl, bool isAddTopItem, DropDownList ddlSub, object ddlDataSource, string ddlTextField, strin... 阅读全文
posted @ 2015-05-29 16:27 KenmuHuang 阅读(602) 评论(0) 推荐(0)
摘要: 场景:使用rdlc开发报表,例如订单产品报表,显示多个订单,一个订单有动态生成的固定的多个产品组成,同时统计每个订单里多个产品数量总数。数据库层面分析:此报表属于交叉报表,例如5个订单,3个产品,总共的数据库记录应该为15条,而不是5条。存在的技术难点:(1)动态列生成使用Matrix矩阵控件(2)... 阅读全文
posted @ 2015-05-29 16:11 KenmuHuang 阅读(3217) 评论(1) 推荐(2)
摘要: 1 public class UserCopy 2 { 3 public class LoginEntity 4 { 5 public string UserName { get; set; } 6 public string UserPwd { g... 阅读全文
posted @ 2015-05-29 15:49 KenmuHuang 阅读(5659) 评论(2) 推荐(0)
摘要: 如tb_flag 数据结构如下:flag int null不能使用:flag==null生成的SQL语句为 where flag=null建议使用:可空类型 用Nullable.Equals(字段,值)var query=from f in db.tb_flagwhere Nullable.Equa... 阅读全文
posted @ 2015-05-29 15:44 KenmuHuang 阅读(3707) 评论(0) 推荐(0)
摘要: 本随笔讲述如何用JavaScript来读取SharePoint 2013 中blog相关的帖子列表。ASCX File Content:JS File Content(Learning_WP_Blog.js): 1 //读取帖子列表里的前10条帖子 2 //Get top 10 items fr... 阅读全文
posted @ 2015-05-29 15:17 KenmuHuang 阅读(329) 评论(0) 推荐(0)
摘要: 这里总结了关于使用ECMAscript对象模型来操作Goup与User的常用情况,内容如下: 1、取得当前Sharepoint网站所有的Groups 2、获取当前登录用户的Title与所属Group 3、获取指定Group下的所有Users 4、获取所有的Groups的所有Users的特定信息 ... 阅读全文
posted @ 2015-05-29 15:04 KenmuHuang 阅读(606) 评论(0) 推荐(0)
摘要: 问题1:在SharePoint 2013页面中使用Javascript 事件window/document.onload/ready时,你会发现处理onload/ready事件的代码根本不能执行。问题2:使用ECMAScript的方式客户端模型调用SP.ClientContext(),出现脚本错误;... 阅读全文
posted @ 2015-05-29 14:49 KenmuHuang 阅读(281) 评论(0) 推荐(0)
摘要: 问题:Personal site's photo can't correct display in the videos pageThe url address of personal site's photo is exist surplus characters.The correct situ... 阅读全文
posted @ 2015-05-29 14:45 KenmuHuang 阅读(304) 评论(0) 推荐(0)
摘要: 问题:为了去掉Photo Gallery的水平滚动效果,更改为根据内容进行自适应宽度多行显示效果Promoter link --> photo galleryNot horizontal scroll the photo解决方式:1、编辑状态下(Edit Page)添加内容编辑器部件(Content... 阅读全文
posted @ 2015-05-29 14:35 KenmuHuang 阅读(500) 评论(0) 推荐(0)
摘要: 此随笔记录自2013年做过的一个SharePoint 2013的HK项目,效果图里面只是测试数据,仅供参考。开发用于SharePoint 2013网站的母版页,必须掌握的知识有:(1)熟悉SharePoint 2013母版页生成原理和操作(2)熟练前端知识(涉及的CSS+DIV和JavaScript... 阅读全文
posted @ 2015-05-29 14:16 KenmuHuang 阅读(345) 评论(0) 推荐(0)
摘要: 最近在SharePoint 2013的网站上发现,没有看到有切换不同用户登录的入口,在SharePoint 2010中是存在这样的菜单项能够很方便的进行用户切换的,不知道为什么,SharePoint 2013默认竟然没有。如下图:这个功能我觉得还是有必要存在的,所以我们需要给它添加一个“以其他用户身... 阅读全文
posted @ 2015-05-29 13:48 KenmuHuang 阅读(318) 评论(0) 推荐(0)
摘要: 在SharePoint 2013默认网站页面中,很多时候,我们需要隐藏左边快速启动菜单栏,这时我们可以通过下面的样式来实现隐藏它。和SharePoint 2010不太一样,方法改了,不过性质是一样的。 阅读全文
posted @ 2015-05-29 13:40 KenmuHuang 阅读(435) 评论(0) 推荐(0)
摘要: 大家在使用SharePoint2013的时候是否发现,地址栏中显示的URL不再变得友好,多出这么一段“_layouts/15/start.aspx#”,怎么看怎么别扭。如果要取消这段路径的显示,需要deactivateMinimal Download Strategyfeature,方法:Site ... 阅读全文
posted @ 2015-05-29 13:35 KenmuHuang 阅读(447) 评论(0) 推荐(0)
摘要: 1 $snapin = Get-PSSnapin | where-object { $_.Name -eq 'Microsoft.SharePoint.PowerShell' } 2 if ($snapin -eq $null){ 3 write-host "Loading SharePoint... 阅读全文
posted @ 2015-05-29 13:10 KenmuHuang 阅读(442) 评论(0) 推荐(0)
摘要: 内容仅供参考,需结合实际需求来处理。=========SharePoint 环境下运行ps1文件,ps1内容如下======= 1 Set-ExecutionPolicy ByPass 2 Add-PSSnapin Microsoft.SharePoint.PowerShell 3 4 Add-... 阅读全文
posted @ 2015-05-29 13:02 KenmuHuang 阅读(404) 评论(0) 推荐(0)
摘要: 备份网站集:1 Backup-SPSite -Identity http://win2012sp2013:1000/ -Path "C:\KenmuTemp\Test File\Temp\siteCollectionBackup.bak" 阅读全文
posted @ 2015-05-29 12:56 KenmuHuang 阅读(405) 评论(0) 推荐(0)
摘要: 导出网站,例如:1 Export-SPWeb -Identity http://win2012sp2013:1000/Hopewell_Portal/ -Path "C:\KenmuTemp\Test File\Temp\siteExport.cmp" -IncludeUserSecurity -I... 阅读全文
posted @ 2015-05-29 12:53 KenmuHuang 阅读(795) 评论(0) 推荐(0)
摘要: 在编辑SharePoint后台XML架构时常需要在ID属性上填写一个GUID (Globally Unique Identifiers 全局唯一标识的简称);我们可以打开SharePoint管理控制台,输入以下PowerShell指令:1 [System.Guid]::NewGuid().toSt... 阅读全文
posted @ 2015-05-29 12:46 KenmuHuang 阅读(1447) 评论(0) 推荐(0)
摘要: 由于博客园随笔内容有限制,不得不拆分为几篇随笔来发布,o(╯□╰)o了续上一篇随笔:Upgrade site collection from SP2010 to SP2013(Part 3)前两篇随笔地址也一并附上:Upgrade site collection from SP2010 to SP2... 阅读全文
posted @ 2015-05-29 11:50 KenmuHuang 阅读(223) 评论(0) 推荐(0)
摘要: 续上一篇随笔:Upgrade site collection from SP2010 to SP2013(Part 2)Configure a job to executeincrementalcrawl every day.Try to search information in our port... 阅读全文
posted @ 2015-05-29 11:36 KenmuHuang 阅读(191) 评论(0) 推荐(0)
摘要: 续上一篇随笔:Upgrade site collection from SP2010 to SP2013(Part 1)Create a web application which can't include any site collection in order to let it as our... 阅读全文
posted @ 2015-05-29 11:26 KenmuHuang 阅读(389) 评论(0) 推荐(0)
摘要: 关于如何升级SharePoint 2010 的网站集到SharePoint 2013;由于篇幅截图较长,这里分为4篇随笔来记录。内容来自于:个人的工作经验总结记录时间:2013年12月31日Description: The help document about upgrade site colle... 阅读全文
posted @ 2015-05-29 11:01 KenmuHuang 阅读(541) 评论(0) 推荐(0)
摘要: 使用名称为“NT AUTHORITY\Authenticated Users” 阅读全文
posted @ 2015-05-29 01:01 KenmuHuang 阅读(191) 评论(0) 推荐(0)
摘要: 在新的Farm(场)里,创建一个新的Web Application(网站应用程序),不需要创建Site Collection(网站集)Copy(复制)自定义开发的WSP包到新的Farm Server(场服务器)上,使用PowerShell进行Deploy(部署)Copy(复制)网站下的web.con... 阅读全文
posted @ 2015-05-29 00:58 KenmuHuang 阅读(1288) 评论(0) 推荐(0)
摘要: 默认是250MB,最大一次上传文件不超过2GThe defaut size is 250MB and maximun upload size is 2047MB. It's can't greater than 2048MB(2G). 阅读全文
posted @ 2015-05-29 00:55 KenmuHuang 阅读(2402) 评论(0) 推荐(0)
摘要: 通过IP访问SharePoint站点,出现“The Web application athttp://172.21.19.132:1000could not be found....”如下错误:解决方式,是配置交替访问映射(Configure alternate access mappings),如... 阅读全文
posted @ 2015-05-29 00:53 KenmuHuang 阅读(483) 评论(0) 推荐(0)
摘要: 日历重合 (Calendars Overlay)的用途就是将 不多于10个日历或日历视图聚集在一个日历视图中显示,并且可以用不同颜色区分来自不同日历或日历视图的事件。1、首先创建一个List View,名称为“ColorCalendar”,Filter中设置根据“Category”值为空过滤数据;此... 阅读全文
posted @ 2015-05-29 00:47 KenmuHuang 阅读(482) 评论(0) 推荐(0)
摘要: 在SharePoint 2007和2010中,自定义dll存放在“C:\Windows\assembly\”文件夹中,在Windows资源管理器中可以看到。但在Sharepoint 2013中,却无法在“C:\Windows\assembly\”中看到,百思不得其解。原来SharePoint 201... 阅读全文
posted @ 2015-05-29 00:40 KenmuHuang 阅读(356) 评论(0) 推荐(0)
摘要: 一、首先设置IIS中的Web.config文件找到对应的IIS应用程序目录,如:C:\inetpub\wwwroot\wss\VirtualDirectories\3000在此文件夹下包含一个web.config文件,打开找到标签,改为;然后找到改为2.2%Program Files%\Common... 阅读全文
posted @ 2015-05-29 00:38 KenmuHuang 阅读(318) 评论(0) 推荐(0)
摘要: SharePoint 2013已经安装好了,接下来就是配置开发环境,安装VS2012,但是装好以后,发现没有SharePoint 2013开发的支持,如下图:VS2012对SharePoint 2013支持,需要装VS插件。先要安装Microsoft Web PlatForm Install 4.0... 阅读全文
posted @ 2015-05-29 00:36 KenmuHuang 阅读(239) 评论(0) 推荐(0)
摘要: I have created one simple workflow on custom list using SharePoint designer 2013.While designing workflow, I have unchecked the “Allow this workflow t... 阅读全文
posted @ 2015-05-29 00:24 KenmuHuang 阅读(404) 评论(0) 推荐(0)
摘要: 问题:(1)提示“reload the page and then start the workflow”错误(2)提示“Unable to properly communicate with the workflow service”异常解决方式:确保以下Services正常启动,可以在运行“Se... 阅读全文
posted @ 2015-05-29 00:21 KenmuHuang 阅读(609) 评论(0) 推荐(0)
摘要: 2012年的一篇随笔记录,可以学习到如何自定义HttpModule,而具体里面针对需求开发的代码,可能未必能让大伙了解到什么,可快速扫描而过。 1 using System; 2 using System.Web; 3 4 using System.Configuration; 5 u... 阅读全文
posted @ 2015-05-29 00:08 KenmuHuang 阅读(1627) 评论(0) 推荐(0)
如果您看完本篇博文,觉得对您有所收获,请点击右下角的 [推荐]
如果您想转载,请注明出处(原创内容,请尊重个人劳动成果)
如果您有任何意见或建议,欢迎留言
感谢您的阅读,敬请关注我的后续博客文章