摘要: 如何使用ASP.NET MVC Framework Preview 2 中ActionFilterAttribute属性设计Form用户验证
首先采用BaseController继承Controller以改写保护方法RedirectToAction为公有方法(用以在ActionFilterAttribute属性中使用),本例中扩展了两个属性RequireLoginAttribute 、 RequireRoleAttribute;在RequireLoginAttribute属性过滤中重定向为登录的用户到登录窗户、在 RequireRoleAttribute属性过滤中将非该用户角色的操作显示访问拒绝信息,具体代码如下:
阅读全文
posted @
2008-03-09 15:59 Bolik 阅读(1533) |
评论 (8) |
编辑
摘要: 由于Asp.Net Mvc 不支持ViewState,也不支持Asp.net Ajax服务器端控件,导致以前写的部门选择控件不能正常使用,搜索jquery的插件也没找到可以使用的插件,所以自己动手写一个jquery.popup插件 完整源代码及示例下载:jquery.popup.rar 下拉框选择控件,该插件需要引用jquery.dimensions插件,结合jquery.treeview可以支持...
阅读全文
posted @
2008-01-23 14:34 Bolik 阅读(3828) |
评论 (18) |
编辑
期待已久的.NET Framework终于在本周开源了,微软在MS-RL协议下终于公开了.NET Framework源代码,我们只可以自由查看,不允许直接进行修改。
第一批开放的源代码包括:
.NET基本类库:
System,System.CodeDom,System.Collections,System.ComponentModel, System.Diagnostics, System.Drawing, System.Globalization, System.IO, System.Net, System.Reflection, System.Runtime, System.Security, System.Text, System.Threading
ASP.NET:
System.Web, System.Web.Extensions
Windows Forms:
System.Windows.Forms
Windows Presentation Foundation:
System.Windows
ADO.NET和 XML:
System.Data
System.Xml
详情请访问ScottGu的文章:http://weblogs.asp.net/scottgu/archive/2008/01/16/net-framework-library-source-code-now-available.aspx
如何在Visual Studio 2008中进行配置请参考这篇文章:Configuring Visual Studio to Debug .NET Framework Source Code
一般在调试时看到的源代码在调试结束后会看不到,那是因为该文件仅在内存中独占存在,你可以在调试时在源代码页标签上点击右键保存即可
posted @
2008-01-18 09:07 Bolik 阅读(799) |
评论 (7) |
编辑
The ASP.NET 3.5 Extensions Preview is a new release that provides new functionality being added to ASP.NET 3.5 and ADO.NET in 2008. This release delivers a set of new features that target:
- Enabling High Productivity Data Scenarios - including MVC, Entity Framework, ADO.NET Data Services and dynamic data
- Supporting Test Driven Development - including a powerful and extensible MVC framework
- Creating the best server for Rich Clients - including Ajax history support and Silverlight controls for ASP.NET
ASP.NET MVC
ASP.NET MVC provides model-view-controller (MVC) support to the existing ASP.NET 3.5 runtime, which enables developers to more easily take advantage of this design pattern. Benefits include the ability to achieve and maintain a clear separation of concerns, as well as facilitate test driven development (TDD).
The ASP.NET MVC Toolkit provides HTML rendering helpers and dynamic data support for MVC.
ASP.NET Dynamic Data
ASP.NET Dynamic Data helps developers build a fully customizable, data-driven app quickly. It provides a rich scaffolding framework that allows rapid data driven development without writing code, yet it is easily extendible using the traditional ASP.NET programming model.
ASP.NET AJAX
New additions to ASP.NET AJAX include support for managing browser history (Back button support).
ADO.NET Entity Framework
ADO.NET Entity Framework is a new modeling framework that enables developers to define a conceptual model of a database schema that closely aligns to a real world view of the information. Benefits include easier to understand and easier to maintain application code that is shielded from underlying database schema changes.
ADO.NET Data Services
ADO.NET Data Services provide new services that find, manipulate and deliver data over the web using simple URIs. Benefits include an easy and flexible way to access data over the web, while enabling the separation of presentation and data access code.
Silverlight Controls for ASP.NET
You can integrate the rich behavior of Microsoft Silverlight into your Web application by using two new ASP.NET server controls: a MediaPlayer server control that enables easy integration of media sources such as audio (WMA) and video (WMV) into your Web application, and a Silverlight server control that allows an ASP.NET page to reference both XAML objects and their event handlers.
下载地址:http://download.microsoft.com/download/6/5/c/65cad864-54a5-463a-9573-bc7d0bbc1df9/ASPNetExt.exe
posted @
2007-12-10 21:07 Bolik 阅读(138) |
评论 (0) |
编辑
server版系统是不能安装Windows Live 系列软件的 不过如果你在xp或Vista下安装过之后只要把Windows Live Writer程序文件拷贝过来就可以使用 我在windows Server 2008与2003下都测试成功。
本文章就是用它发布的
posted @
2007-12-06 15:18 Bolik 阅读(104) |
评论 (0) |
编辑
道德修养
对人和对事的基本态度来源于道德修养,比如从小就开始的思想品德课和父母的言传身教。当我们有了认识和鉴别事物能力后,则有被动接受道德转变为了主动的修身养性。在这个过程中我们形成自身的人生观,价值观和是非观。
个人习惯
态度决定一切,而习惯则决定态度。因为改变习惯很好,所以改变态度也同样是困难的事情。当我们养成守时,注重细节,诚信,积极主动等习惯后,我们对人和事物的态度也随之改变。习惯力量巨大,习惯影响态度,而态度决定了行动。
科学追求
严谨务实是重要的态度,而这个态度则更多来源于我们对科学的学习和对客观世界的认识,要改造世界首先得认识世界,而认识世界则需要对科学的追求,对事物客观的评价。道德和习惯指导我们做正确的事情,科学的态度指导我们正确的做事情。
专业精神
具备了前面三者才可能形成专业的精神,从事任何工作或事业都有这种精神,专业精神就是信守自己的承诺,做一件事情就把它做好的精神,专业精神重要的体现就是严谨和责任感。你可以不认同企业的一些文化,但需要认同这种实事求是,勇于探索,严谨客观的精神。
posted @
2007-06-27 16:42 Bolik 阅读(75) |
评论 (0) |
编辑
600356 恒丰纸业
600832 东方明珠
000042 深长城
000528 柳工
000858 五粮液
000876 新希望
580009 伊利CWB1
关注股票
600170 上海建工
000544 中原环保
000625 长安汽车
000768 西飞国际
000952 广济药业
600808 马钢股份
580008 国电JTB1
580011 中化CWB1
030002 五粮YGC1
posted @
2007-05-06 14:12 Bolik 阅读(235) |
评论 (0) |
编辑
上周买进 五粮YGC1 030002 一周疯狂涨了 52% 加上后来追涨的资金最终平均收益38.2% 你本周继续持有
明天操作准备
买进少量 长安汽车 000625 探长势然后顺势跟进以迎接上海国际车展(2007年4月20日-4月28日)
买进部分 伊利CWB1 580009 短线操作
郑重声明: 内容纯属个人观点,并不构成投资建议,仅供参考。如果读者据此操作,风险自担。
posted @
2007-04-15 19:24 Bolik 阅读(135) |
评论 (0) |
编辑
博客行为守则
我们褒扬博客圈,因为博客圈有着直率与公开的对话,但是直率不代表不文明。我们提出这份博客行为守则,就是希望这份守则能协助创造一个鼓励个人思想传达以及具建设性对话的文化。你可以不同意某个人的看法,但不需要闹得不愉快。
1. 我们为我们说过的话(打过的字)负责,同时保留权利来限制我们博客上那些不遵守基本文明标准的评论、回复内容。
我们遵循"励行文明"标准:我们竭力于发表高品质、可为人接受的内容,而且我们会删除那些无法为人接受的评论、回复。
我们以下面这些来判断何谓无法为人接受的评论、回复:
- 评论、回复被用来咒骂、骚扰、跟踪、或威胁其他人
- 毁谤、明知有误、诉诸情感、错误呈现他人
- 侵犯作者权或商标
- 违反保密义务或责任
- 侵害他人隐私
我们以个别案例来判断何者为"无法为人接受的内容",我们的定义不受限于此列表。如果我们删除某则评论、回复或链结,我们会说清楚、解释明白。(我们保留权利在任何时候更动这些标准而不需要提醒)
2. 我们不会在网络上说那些我们无法面对面说出口的东西。
3. 如果情势渐趋紧张,我们会在公开回应之前先私下联络。
如果我们在博客上遇到冲突与错误呈现,在我们发布任何相关文章跟评论、回复之前,我们会尽一切力量在私底下直接与相关人士沟通--或是找一位中间人来帮忙。对于尚未解决的争议,博客应该进行线上调停。Mediate.com 将会提供调停人。
4. 当我们相信有人正不公平地攻击他人,我们会采取行动。
如果有人发表了攻击性的评论、回复或博客文章,我们会告诉他(尽量在私底下),然后请他公开修正他的言论。如果那些已经发表的评论、回复可被视为威胁,犯者也不愿意撤回评论、回复或是道歉,我们将会与诉诸法律来保护当事者不受威胁。
5. 我们不容许匿名评论、回复。
我们要求评论、回复者在评论、回复之前必须提供有效的电子邮件,不过我们容许评论、回复者不用真名,而以化名来评论、回复。
6. 我们不理会戳乐 (troller)。
我们不回应关于我们或我们博客的那些污秽且令人不愉快的评论、回复,只要内容不流于咒骂或毁谤。我们相信喂食这些戳乐只会助长他们的气焰 ---- "别跟猪打架。你们都会弄得满身脏污,但猪就是喜欢脏污"。别管那些公开的攻击通常是制止他们的最好方法。
7. 我们鼓励博客服务提供者确切落实他们的服务声明。
当博客做了这种过份滥行,像是创建假的个人博客来骚扰其他博客,博客服务提供者应该为他们用户的举措负起责任。
(完)(转载译文出自于 Portnoy 的文章,根据大陆语言习惯略有修改)Blogger 行为守则
The Blogger's Code of Conduct
We celebrate the blogosphere because it embraces frank and open conversation. But frankness does not have to mean lack of civility. We present this Blogger Code of Conduct in hopes that it helps create a culture that encourages both personal expression and constructive conversation. One can disagree without being disagreeable.
1. We take responsibility for our own words and reserve the right to restrict comments on our blog that do not conform to basic civility standards.
We are committed to the "Civility Enforced" standard: we strive to post high quality, acceptable content, and we will delete unacceptable comments.
We define unacceptable comments as anything included or linked to that:
- is being used to abuse, harass, stalk, or threaten others
- is libelous or knowingly false
- infringes upon any copyright, trademark, trade secret or patent of any third party. (If you quote or excerpt someone's content, it is your responsibility to provide proper attribution to the original author. For a clear definition of proper attribution and fair use, please see The Electronic Frontier Foundation's Legal Guide for Bloggers.)
- violates an obligation of confidentiality
- violates the privacy of others
We define and determine what is "unacceptable content" on a case-by-case basis, and our definitions are not limited to this list. If we delete a comment or link, we will say so and explain why. [We reserve the right to change these standards at any time with no notice.]
2. We won't say anything online that we wouldn't say in person.
Unless we are trying to protect a confidential source, in which case, we may omit certain private details or otherwise obfuscate the source of the information.
Unless in real life you would face physical intimidation, whereas online you could avoid it.
3. If tensions escalate, we will connect privately before we respond publicly.
When we encounter conflicts and misrepresentation in the blogosphere, we make every effort to talk privately and directly to the person(s) involved--or find an intermediary who can do so--before we publish any posts or comments about the issue. Bloggers are encouraged to engage in online mediation of unresolved disputes. Mediate.com will provide mediators.
4. When we believe someone is unfairly attacking another, we will take considered action.
When someone who is publishing comments or blog postings that are offensive, we'll tell them so (privately, if possible) and ask them to publicly make amends, unless it is considered that doing so will only inflame or worsen the situation. If those published comments could be construed as a threat or of an illegal nature, and the perpetrator doesn't withdraw them and apologize, we will cooperate with local law enforcement regarding those comments and/or postings.
Comments or posts that are deemed offensive will result in a request - private, if possible - that the commenter or poster make public amends, if practical. If those published comments could reasonably be viewed as illegal (threat or otherwise), we will report the comments and commenter to police.
5. We do not allow anonymous comments, but will allow pseudonymous ones.
We require commenters to supply a valid email address or OpenID before they can post, though we allow commenters to identify themselves as anonymous, rather than use their real name, which is the difference between pseudonymous and anonymous. We can always trace someone pseudonym.
(For discussion on this please visit the talk page.)
6. We ignore the trolls.
We prefer not to respond to nasty comments about us or our blog, as long as they don't veer into abuse or libel. We believe that feeding the trolls only encourages them -- "I learned long ago, never to wrestle with a pig. You get dirty, and besides, the pig likes it. (George Bernard Shaw)" Ignoring public attacks is often the best way to contain them.
7. We encourage blog hosts to enforce more vigorously their terms of service.
When bloggers engage in such flagrantly abusive behavior as creating impersonating sites to harass other bloggers they should take responsibility for their clients' behavior.
转自 Blogger's Code of Conduct
posted @
2007-04-12 16:26 Bolik 阅读(80) |
评论 (0) |
编辑
以前的文章没有分类信息,今天采用Windows Live Write将其重新分了类,发现获取博客列表与文章是很有用,但比较烦得是文章列表每次都得重新取很不愉快
posted @
2007-01-01 11:07 Bolik 阅读(64) |
评论 (0) |
编辑
I resolve to have resolve; I promise to be more promising; I swear I will try to stop swearing; I will focus on being more focused; I agree to be more agreeable; I give my word to try to not have words with people; I maintain that I will be low maintenance; I declare that I will not make declarations; I will still opt to keep my options open; I will still have exact change for when madness takes its toll.
posted @
2007-01-01 09:02 Bolik 阅读(64) |
评论 (0) |
编辑
现在半年的试用期到了,现在不能用了谁有License或者有别的解决办法,
急啊! 重装的话历史数据全丢了呀,如果重装如何保证数据仍然可用?
暂时在首页放一下 多谢多谢!

幸好系统装在虚拟机上,而宿主机也不是我现在用的机器,修改时间还是可以用的 呵呵!
posted @
2006-11-20 09:00 Bolik 阅读(354) |
评论 (1) |
编辑
最近几天去武汉招聘,去了武汉大学、武汉理工大学、华中科技大学,发现现在的研究生跟以前的本科生差不多,基本功都不怎么样,有些非常简单的问题都答不上来,也许是我的运气不好也许是现在扩招的原因吧,想想说来女硕士找工作还是比较难,虽然成绩都很好,可是动手能力相对要差一点,一般企业招硕士至少要在简单培训后能够独立干活,本科只要专业对口,基本功还不错就可以培养一下,研究生是不愿意培训的!以上仅是个人看法
posted @
2006-11-13 16:01 Bolik 阅读(110) |
评论 (0) |
编辑