畅想!!

馨园

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

随笔分类 -  asp.net

摘要:用 mvc4中的WEBAPI, Post 到后台的参数如果为string,则直接接收不到,解决方案有两种 1、传递参数为自定义类 2、通过如下方式获取://获取传统contextvar context = (HttpContextBase)Request.Properties["MS_HttpCo... 阅读全文
posted @ 2015-12-29 13:54 阿乐01 阅读(525) 评论(0) 推荐(0)

摘要:An object with the same key already exists in the ObjectStateManager. The ObjectStateManager cannot track multiple objects with the same key. 阅读全文
posted @ 2012-07-20 14:44 阿乐01 阅读(1590) 评论(0) 推荐(1)

摘要:Mvc 3 中 有RadioButtonFor 但是没有list,扩展一下,方法如下: View Code publicstaticMvcHtmlStringRadioButtonListFor<TModel,TProperty>(thisHtmlHelper<TModel>htmlHelper,Expression<Func<TModel,TProperty>>expression,IEnumerable<SelectListItem>selectList,stringoptionLabel,IDictionary<strin 阅读全文
posted @ 2012-03-26 09:38 阿乐01 阅读(2686) 评论(0) 推荐(1)

摘要:Repository 模式 阅读全文
posted @ 2012-03-12 09:35 阿乐01 阅读(943) 评论(0) 推荐(0)