01 Dec 2008

把ASP.NET MVC的路由利用配置维护起来

配置大多就是文件配置或者数据库配置了


ref:


http://mnour.blogspot.com/2008/11/mvc-routing-using-custom-configuration.html


http://www.cnblogs.com/QLeelulu/archive/2008/11/24/1340212.html


http://www.iansuttle.com/blog/post/ASPNET-MVC-Store-Routes-in-the-Database.aspx


我觉得加上做webform时常用的PageAlias和BuildUrl会更好用些

07 Oct 2008

jQuery从此更牛了

为什么更牛了?

 

26日回家,昨天才返回,这么好的消息自己错过了,补记一下。

 

see see

 

 

Scott Guthrie公告 (jQuery将成为Visual Studio的一部分等更多好消息...)

 
jQuery头儿John Resig公告(jQuery, Microsoft, and Nokia)

 
Scott Hanselman的jQuery的演示

09 Aug 2008

【分享】如何创建自己的Visual Studio 2005/2008配色

自己改过配色的朋友都知道在Vs内配置比较麻烦,导入过别人配好的现成配置的朋友,有没有研究过那个.vssettings文件是个什么东西呢?


用文本编辑器打开它就能看到那是个Xml文件,现在有了一个很好的在线工具能够方便的搞出自己喜欢的配色,然后再导入就OK了。


http://frickinsweet.com/tools/Theme.mvc.aspx


vs_them_generator

19 Jul 2008

我学Linq to SQL做的demo

最近才开始学LINQ to SQL,

做了个demo,都是基本操作。

有兴趣的朋友看看。

http://download.csdn.net/source/528628

17 Jul 2008

Latest preview of the ASP.Net MVC available on CodePlex


ASP.NET MVC Preview 4 available!!!



Runtime Binary ASP.NET MVC CodePlex Preview 4




runtime binary, 1075K, uploaded Today - 772 downloads

DocumentationASP.NET Codeplex Preview 4 Readme
documentation, 71K, uploaded Today - 359 downloads

DocumentationASP.NET Codeplex Preview 4 Readme (PDF)
documentation, 469K, uploaded Today - 360 downloads

DocumentationChanges between Preview 3 and Codeplex Preview 4
documentation, 52K, uploaded Today - 208 downloads

DocumentationChanges between Preview 3 and Codeplex Preview 4 (PDF)
documentation, 174K, uploaded Today - 226 downloads

17 Jul 2008

Latest preview of the ASP.Net MVC available on CodePlex


ASP.NET MVC Preview 4 available!!!



Runtime Binary ASP.NET MVC CodePlex Preview 4




runtime binary, 1075K, uploaded Today - 772 downloads

DocumentationASP.NET Codeplex Preview 4 Readme
documentation, 71K, uploaded Today - 359 downloads

DocumentationASP.NET Codeplex Preview 4 Readme (PDF)
documentation, 469K, uploaded Today - 360 downloads

DocumentationChanges between Preview 3 and Codeplex Preview 4
documentation, 52K, uploaded Today - 208 downloads

DocumentationChanges between Preview 3 and Codeplex Preview 4 (PDF)
documentation, 174K, uploaded Today - 226 downloads

14 Jun 2008

提供我现用的Vs配色(灰黑色调)下载,有兴趣的朋友玩玩。

提供我现用的Vs配色(灰黑色调)下载,

 

有兴趣的朋友玩玩。

 

附件是Vs2005的,如果要在Vs2008下用,

 

自己用文本编辑器打开修改version为9.0即可。效果见截图



 

 
  点这里下载

23 Apr 2008

CustomError可以设置绝对路径

偶然发现web.config内自定义错误信息页面
  <customErrors mode="RemoteOnly"     defaultRedirect="503.aspx">
   <error statusCode="404" redirect="404.aspx"/>
  </customErrors>

可以设置成
  <customErrors mode="RemoteOnly"     defaultRedirect="503.aspx">
   <error statusCode="404" redirect="http://www.github.com/404.aspx"/>
  </customErrors>
这样的绝对路径.
看了一下 CustomErrorsSection 中的代码

internal string GetRedirectString(int code)
{
    
string absoluteRedirect = null;
    
if (this.Errors != null)
    
{
        CustomError error 
= this.Errors[code.ToString(CultureInfo.InvariantCulture)];
        
if (error != null)
        
{
            absoluteRedirect 
= GetAbsoluteRedirect(error.Redirect, this.basepath);
        }

    }

    
if (absoluteRedirect == null)
    
{
        absoluteRedirect 
= this.DefaultAbsolutePath;
    }

    
return absoluteRedirect;
}

 

 

发现事实如此.
期间有个小笑话,我试验的时候顺手输入了个http://x x.com/404.aspx (两个xx中没空格)这样到一个页面跳入了一个xx站点,吓我一大跳. ,工位附近有MM,不知道有否影响本人正值地形象哦

23 Apr 2008

CustomError可以设置绝对路径

偶然发现web.config内自定义错误信息页面
  <customErrors mode="RemoteOnly"     defaultRedirect="503.aspx">
   <error statusCode="404" redirect="404.aspx"/>
  </customErrors>

可以设置成
  <customErrors mode="RemoteOnly"     defaultRedirect="503.aspx">
   <error statusCode="404" redirect="http://www.github.com/404.aspx"/>
  </customErrors>
这样的绝对路径.
看了一下 CustomErrorsSection 中的代码

internal string GetRedirectString(int code)
{
    
string absoluteRedirect = null;
    
if (this.Errors != null)
    
{
        CustomError error 
= this.Errors[code.ToString(CultureInfo.InvariantCulture)];
        
if (error != null)
        
{
            absoluteRedirect 
= GetAbsoluteRedirect(error.Redirect, this.basepath);
        }

    }

    
if (absoluteRedirect == null)
    
{
        absoluteRedirect 
= this.DefaultAbsolutePath;
    }

    
return absoluteRedirect;
}

 

 

发现事实如此.
期间有个小笑话,我试验的时候顺手输入了个http://x x.com/404.aspx (两个xx中没空格)这样到一个页面跳入了一个xx站点,吓我一大跳. ,工位附近有MM,不知道有否影响本人正值地形象哦

20 Apr 2008

使用AzMan找不到Microsoft.Interop.Security.AzRoles的解决方法

在c:/Windows/system32下找到azRoles.dll

如果没有Xp/2003请安装http://www.microsoft.com/downloads/details.aspx?FamilyID=e487f885-f0c7-436a-a392-25793a25bad7&DisplayLang=en.

Win2000请安装http://www.microsoft.com/downloads/details.aspx?FamilyID=7edde11f-bcea-4773-a292-84525f23baf7&DisplayLang=en.

Vs2003/Vs2005/Vs2008命令行,或者Cmd命令行进入.net安装目录

敲入:

d:\Program Files\Microsoft Visual Studio 9.0\VC>tlbimp azroles.dll /out:Microsof

t.Interop.Security.AzRoles.dll /namespace:Microsoft.Interop.Security.AzRoles


成功提示:


Microsoft ® .NET Framework Type Library to Assembly Converter 3.5.21022.8

Copyright © Microsoft Corporation.  All rights reserved.


Type library imported to d:\Program Files\Microsoft Visual Studio 9.0\VC\Microso

ft.Interop.Security.AzRoles.dll




引用这个文件就OK了。