作者: zhongdaiqi

  • upload file by iframe

    借用iframe上传文件,并在iframe中写入<script>parent.window.done(jsonstr);</script>

  • sqlserver TYPE Table

    sqlserver 使用自定义表

    new SqlParameter("@xxxxx", SqlDbType.Structured);

  • 反射加载

    从SmartCoder里提取出来的代码:反射加载代码片断

    过滤器有很多个备选,动态选择。

    private IFilter getFilter(string filterName) { Type o = Type.GetType(filterName);//加载类型 IFilter filter = (IFilter)Activator.CreateInstance(o, true); return filter; }

    <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="FilterSetting" type="TemplateEngine.FilterSettingSection, TemplateEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" allowDefinition="Everywhere" allowExeDefinition="MachineToApplication" restartOnExternalChanges="true" /> </configSections> <FilterSetting default="DefaultFilter"> <Filters> <clear /> <add name="DefaultFilter" type="TemplateEngine.Filter.DefaultFilter,TemplateEngine,Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/> <add name="Filter1" type="TemplateEngine.DefaultFilter,Test"  /> <add name="Filter2" type="Test.Filter2,Test"  /> <add name="Filter3" type="Test.Filter3,Test"  /> <add name="Filter4" type="Test.Filter4,Test"  /> </Filters> </FilterSetting> </configuration>

  • Json.Net DateTime Problem

    var jsonContent =JsonConvert.SerializeObject(responseModel, Formatting.None, new IsoDateTimeConverter() { DateTimeFormat = "yyyy-MM-dd hh:mm:ss" });"OrgDateTime":"2013-11-12 09:55:00" 
    

    问题描述:json 时间  多了个T

    经验证:此处理方法有效! .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, “Courier New”, courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }

    转自:http://hi.baidu.com/jingjie520/item/3effca6ddb44e190c5d249db