zoukankan      html  css  js  c++  java
  • Spring.net页面属性注入

    1.条件spring.web程序集 
    1.1 system.web配置
    <httpHandlers>
          <add verb="*" path="*.aspx" type="Spring.Web.Support.PageHandlerFactory, Spring.Web"/>
    </httpHandlers>
    1.2 httpModules配置
    <httpModules>
    <add name="Spring" type="Spring.Context.Support.WebSupportModule, Spring.Web"/>
    </httpModules>
    1.3 system.webserver配置
      <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/> 
        <modules>
          <add name="Spring" type="Spring.Context.Support.WebSupportModule, Spring.Web"/>
        </modules>
        <handlers>
          <add name="SpringPageHandler" verb="*" path="*.aspx" type="Spring.Web.Support.PageHandlerFactory,
     Spring.Web"/>
          <add name="SpringContextMonitor" verb="*" path="ContextMonitor.ashx" type="Spring.Web.Support.ContextMonitor,
     Spring.Web"/>  
        </handlers>
      </system.webServer>
    1.4 spring xml配置 注意type要写web的文件路径否则会出错,网站大多是抄的,所以都只有一个Default.aspx,这里要特别注意否则功亏一篑

    <object type="~/admin/Sys/SysDictTypeEdit.aspx">
    <property name="Psvc" ref="SysDictTypeService"/>

    </object>

    <object id="SysDictTypeService" type="Bll.SysDictTypeService, HRABLL">
    <property name="Dao" ref="CommonService"/>
    <property n

    1.5 页面放个属性就好了

    private Contract.IService.ISysDictTypeService psvc;
    /// <summary>
    /// 初始化
    /// </summary>
    public Contract.IService.ISysDictTypeService Psvc
    {
    get;set;

    }

  • 相关阅读:
    C字符串处理函数
    C语言字符串函数大全
    那些闪亮的日子
    牛客网在线编程:幸运数
    牛客网在线编程:水仙花数
    [LeetCode]617.Merge Two Binary Trees
    [LeetCode]657.Judge Route Circle
    [LeetCode]141. Linked List Cycle
    五大算法:分治,贪心,动态规划,回溯,分支界定
    [LeetCode]387.First Unique Character in a String
  • 原文地址:https://www.cnblogs.com/kexb/p/5922415.html
Copyright © 2011-2022 走看看