上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 24 下一页
  2011年7月4日
摘要: Math.Round默认采用的不是四舍五入法, 而是四舍六入的银行家算法, 也就是四舍六入五考虑,五后非零就进一,五后皆零看奇偶,五前为偶应舍 去,五前为奇要进一, 这个算法比四舍五入更精确些. Response.Write("<BR>" + Math.Round(144.34, 1)); --144.3 Response.Write("<BR>" + Math.Round(144.15, 1));--144.2 Response.Write("<BR>" + Math.Round(144.25, 阅读全文
posted @ 2011-07-04 17:42 BobLiu 阅读(2479) 评论(0) 推荐(0)
  2011年6月22日
摘要: 闲来无事, 总结回顾一下不清楚的技术点:1.Session存在server上, asp.net有几种存储方式, 一是inproc, 二是sqlserver, 三是stateserver, 四是可以放到Appfabric Caching中去(这是.net 4.0中新加的).2.Cookie存在客户端浏览器里, 如果加上expired, 则会保存到客户硬盘上去. 用户可以启用cookie, 也可以关闭cookie, 就这个自由, 导致的问题就来了.3.网站如何识别已登录用户呢?用户访问网站时, 网站会分配一个sessionID给该浏览器, 这个sessionID存在于客户端的cookie中, 这样 阅读全文
posted @ 2011-06-22 16:37 BobLiu 阅读(5953) 评论(3) 推荐(2)
  2011年6月20日
摘要: 指定Client控件输出时的 HTML id在 .NET Framework 4.0 以前,控件输出时的 HTML 的 id 与我们在 .aspx 页面中指定的不一定相同,这是由于 ASP.NET 为了防止冲突造成的。但也造成了客户端编程的不方便。.NET Framework 4.0 就解决了这个麻烦,为控件增加了 ClientIDMode 属性。AutoID 默认值,.NET Framework 4.0 之前的样子。Static 这个就是写的 ID 是什么,输出就是什么。Predictable 上面两种方式都太极端,像 GridView 等数据绑定控件,用这个就比较合适,因为有很多行,不可能 阅读全文
posted @ 2011-06-20 17:52 BobLiu 阅读(286) 评论(0) 推荐(0)
摘要: Setting Meta Tags方便搜索引擎搜索:protected void Page_Load(object sender, EventArgs e){ Page.MetaKeywords = "新闻,体育,围棋"; Page.MetaDescription = "新闻1,体育1,围棋1";}<meta name="description" content="新闻1,体育1,围棋1" /><meta name="keywords" content="新闻,体育, 阅读全文
posted @ 2011-06-20 17:12 BobLiu 阅读(193) 评论(0) 推荐(0)
  2011年5月12日
摘要: How to delete a windows service Recently, I was trying to delete a windows service. Normally it should not be necessary to manually delete a service. Uninstalling an application should remove its associated service (if any).However, I installed some beta products and a service created by one of the 阅读全文
posted @ 2011-05-12 17:46 BobLiu 阅读(2289) 评论(0) 推荐(0)
  2011年5月9日
摘要: 1.PowerShell今天刚刚用了下PowerShell, 才知道它是描着linux的b shell, k shell等来的, 除了命令行的界面, 还有一个集成开发环境PowerShell ISE(Integrated Scripting Environment), 类似linux里的vim, vm等脚本编辑工具, 不过PowerShell ISE有漂亮的编辑界面和完善的调试功能,使脚本的书写变得方便了.Get-CommandGet-HelpGet-Process2.PowerShell的执行权限, 为防止恶意脚本的执行,默认机器的执行策略是Restricted - 脚本不能运行.Get-E 阅读全文
posted @ 2011-05-09 17:35 BobLiu 阅读(851) 评论(0) 推荐(0)
摘要: 在开发机器上测试没有问题, 一到服务器上就出现这个问题那个问题, 究其原因, 是因为在开发机上使用administrator这个build-in帐号登录, 基本上不会遇到什么权限类问题, 而服务器上为了安全起见, 有时不使用administrator帐号登录, 而是另建帐号, 授予administrators组的权限, 这样, 问题就来了.1. 服务Services中的AppFabricCachingService安装上以后默认没有启动, 首先要启动一下.2. 运行PowerShell操作cache, 在启动start-cachecluster,停止stop-cachecluster有可能会出 阅读全文
posted @ 2011-05-09 16:43 BobLiu 阅读(3746) 评论(10) 推荐(0)
  2011年5月3日
摘要: 最佳答案: Yes it is a problem. Much like you can't add a reference to a .NET 2.0 assembly from a .NET 1.0 or 1.1 project. The .NET 4.0 is a new runtime version of the framework (CLR). The .NET 3.5 and 3.0 releases both use the 2.0 runtime version of the framework (CLR).You can always add a reference 阅读全文
posted @ 2011-05-03 17:58 BobLiu 阅读(1412) 评论(0) 推荐(0)
  2011年4月29日
摘要: 使用 StateServer 保存 Session 解决 Session过期,登陆过期问题。Post by dazix, 2009-10-12, Views:835 使用 StateServer 保存 Session 正常操作情况下Session会无故丢失。因为程序是在不停的被操作,排除Session超时的可能。另外,Session超时时间被设定成60分钟,不会这么快就超时的。 原因:由于Asp.net程序是默认配置,所以Web.Config文件中关于Session的设定如下:<sessionState mode='InProc stateConnectionString= 阅读全文
posted @ 2011-04-29 13:33 BobLiu 阅读(1298) 评论(0) 推荐(0)
  2011年4月22日
摘要: 错误:System.Net.Mail.SmtpException: Exceeded storage allocation. The server response was: 4.3.1 Message size exceeds fixed maximum message size at System.Net.Mail.DataStopCommand.CheckResponse(SmtpStatusCode statusCode, String serverResponse) at System.Net.Mail.SmtpConnection.OnClose(Object sender, Ev 阅读全文
posted @ 2011-04-22 17:18 BobLiu 阅读(2030) 评论(0) 推荐(0)
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 24 下一页