摘要:用 mvc4中的WEBAPI, Post 到后台的参数如果为string,则直接接收不到,解决方案有两种 1、传递参数为自定义类 2、通过如下方式获取://获取传统contextvar context = (HttpContextBase)Request.Properties["MS_HttpCo...
阅读全文
随笔分类 - asp.net
摘要:An object with the same key already exists in the ObjectStateManager.
The ObjectStateManager cannot track multiple objects with the same key.
阅读全文
摘要:Mvc 3 中 有RadioButtonFor 但是没有list,扩展一下,方法如下: View Code publicstaticMvcHtmlStringRadioButtonListFor<TModel,TProperty>(thisHtmlHelper<TModel>htmlHelper,Expression<Func<TModel,TProperty>>expression,IEnumerable<SelectListItem>selectList,stringoptionLabel,IDictionary<strin
阅读全文

浙公网安备 33010602011771号