随笔分类 -  .NET Web

摘要:ViewState and Dynamic ControlRestore ViewState data with ViewStateModeById 阅读全文
posted @ 2013-07-24 16:03 C.Jun 阅读(112) 评论(0) 推荐(0)
摘要:We may face to the problem that how to reduce the size of XAP file in Silverlight, there is the solution:Move to Silverlight project and right click, open property window, then check the option as below,Specify the reference path to a folder, e.g. ~/SharedLib/Add the XML format for each of your asse 阅读全文
posted @ 2012-02-05 21:25 C.Jun 阅读(217) 评论(0) 推荐(0)
摘要:I met some troubles when tring to create directory with access rights, fortunately, I found some useful imformation, just mark them as below,View Code Imports System.Security.AccessControlImports System.IO Public Class Form1 ' Add access control for Windows Account to directory or file Private S 阅读全文
posted @ 2011-03-11 15:42 C.Jun 阅读(282) 评论(0) 推荐(0)
摘要:近来项目里用到很多小技巧,在这里做个总结。1. Asp.Net的Forms验证以及Remember Me的自动登录功能。使用Asp.Net的Login控件后,发现勾选Remember Me的选项后并没有自动实现自动登录功能。我们需要做的,是再添加一些自己的代码,一般的做法是结合Cookie来实现这种功能。这里有一篇写得很详细的文章作为参考。PS:Request.IsAuthenticated属性很重要,用来判断是否经过合法登录验证。2. Asp.Net支持的多语言功能。Asp.Net有强大的多语言支持,不同的语言可以写在不同的资源文件里面。比如,在App_GlobalResources文件夹下 阅读全文
posted @ 2010-11-04 11:23 C.Jun 阅读(401) 评论(0) 推荐(0)
摘要:Report server report viewer 404 - File or directory not foundWith SQL Server 2008 and IIS7, you may run into this error like I did. The fix for me was to do the following:Under IIS area, double-click ... 阅读全文
posted @ 2010-07-19 09:23 C.Jun 阅读(317) 评论(0) 推荐(0)
摘要:一款不错的基于JQuery的auto-complete插件,这款插件最大的好处就是我们能够得到{value, text}结构的数据,这与传统的下拉框很相似,非常适合用于项目开发。生成后的Html页面代码代码以下是基于MVC的一个例子前台调用代码后台代码代码XmlResult类代码 阅读全文
posted @ 2010-07-12 13:22 C.Jun 阅读(551) 评论(0) 推荐(0)
摘要:接触NHibernate不久,今天在级联更新上浪费了很多时间,怎么都没达到主-从表自动更新的效果。网上文章找了一大把,说得都迷迷糊糊,一知半解... 所幸在鄙人再三努力之下,找到一篇好文,特此随笔~!inverse属性原文:该属性通常存在于双向管理关系中的<set>等列表标签中,其含义是“是否是镜像”的含义。比如在many-to-one双向关联关系中One方的&... 阅读全文
posted @ 2010-05-24 14:42 C.Jun 阅读(1408) 评论(1) 推荐(1)
摘要:今天学习了C#中的Attribute,略做总结1.Attribute的本质它的本质是一个类,能够对程序中的元素进行标注(如assembly, class, constructor, delegate, enum, event, field, interface, method, portable executable file module, parameter, property, return... 阅读全文
posted @ 2010-05-12 17:31 C.Jun 阅读(530) 评论(1) 推荐(1)
摘要:难得项目空闲,用了点时间看了下.Net的Smtp类,略作随笔首先当然是引用程序集:System.NetSystem.Net.Mail然后需要实例化MailMessage对象:MailAddress from = new MailAddress("from@163.com");MailAddress to = new MailAddress("to@163.com");MailMessage mes... 阅读全文
posted @ 2010-05-05 14:16 C.Jun 阅读(534) 评论(2) 推荐(0)
摘要:非常详细的N2API文档,以及N2的Wiki和讨论区,特此贴出,以备参考。 参考:http://consultingblogs.emc.com/jamesbroome/archive/2009/04/24/why-i-like-n2-cms.aspx 阅读全文
posted @ 2010-03-25 14:47 C.Jun 阅读(235) 评论(0) 推荐(0)
摘要:很有幸的,今天针对N2中非管理权限用户的数据保存方法有了些心得:1.XML文件保存很显然,通用的文件保存方式不论在Mvc框架下或者是Web框架下都能达到我们的目的。2.N2 API这里向大家介绍一些更为有效的方法,包括创建节点,更新节点,移动节点,复制节点和删除节点等等创建节点: public void CreateNews(ContentItem parent, string title, st... 阅读全文
posted @ 2010-03-17 11:36 C.Jun 阅读(238) 评论(0) 推荐(1)
摘要:PS:本文转自EricZhang's Tech Blog,在那上面还有几篇关于MVC开发值得新手入门学习的文章,写得也都很不错。摘要 本文作为《ASP.NET MVC案例教程》的完结篇,仅从个人角度,发表一些对ASP.NET MVC框架的看法。并且在最后会附上本系列文章的Demo下载。前言 写这篇文章的目的,是想总结一些东西,以帮助朋友们更好的使用这个框架。但是,我又不像把官方列举的哪些优势、功能... 阅读全文
posted @ 2010-01-27 13:43 C.Jun 阅读(1672) 评论(1) 推荐(2)