17.03.24 OA项目问题记录

2017-03-31  本文已影响14人  CH小猫
  1. jquery.unobtrusive-ajax.min.js 的引用
    jquery.unobtrusive-ajax.min.js的引用要在jquery.min.js的引用之后,否则会导致jquery.unobtrusive-ajax.min.js不生效
  2. jquery.unobtrusive-ajax.min.js 的使用
@using (Ajax.BeginForm("EditCategoryInfo", "CategoryInfo", new { }, new AjaxOptions() { HttpMethod = "post", OnSuccess = "afterEdit" }, new { id = "editForm" }))
{
}
  1. 通过radio的值选中对应的radio
 $(":radio[name='status'][value='" + status + "']").prop("checked", "checked");
  1. 在Asp.net MVC中应该怎样使用Spring.Net?
  2. 先导入dll文件
Spring.Core.dll
Spring.Web.dll
Spring.Web.Mvc4.dll
// controller.xml
<?xml version="1.0" encoding="utf-8" ?>
<objects xmls="http://www.springframework.net">
<object type="Caty.OA.WebApp.Controllers.CategoryInfoController,Caty.OA.WebApp" singleton="false">
<property name="CategoryInfoService" ref="CategoryInfoService"/>
</object>
</objects>
// services.xml
<?xml version="1.0" encoding="utf-8" ?>
<objects>
  <object type="Caty.OA.BLL.CategoryInfoService,Caty.OA.BLL" singleton="false" name="CategoryInfoService">
  </object>
</objects>
<configuration>
  <configSections>
    <sectionGroup name="spring"><!--Spring.Net配置-->
      <section name="context" type="Spring.Context.Support.MvcContextHandler, Spring.Web.Mvc4" />
      <section name="objects" type="Spring.Context.Support.DefaultSectionHandler, Spring.Core" />
    </sectionGroup>
  </configSections>
  <spring><!--Spring.Net配置-->
    <context>
      <resource uri="file://~/Config/controllers.xml" />
      <resource uri="file://~/Config/services.xml" />
    </context>
  </spring>
  <!--Spring.Net配置结束-->
</configuration>
 public class MvcApplication : SpringMvcApplication //System.Web.HttpApplication
    {
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            RouteConfig.RegisterRoutes(RouteTable.Routes);
        }
    }
上一篇下一篇

猜你喜欢

热点阅读