国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > .NET > 正文

Localization/MasterPage in ASP.NET 1.1 with Spring

2024-07-10 12:55:46
字體:
來源:轉載
供稿:網友
 

1. get spring.core/spring.web from sourceforge's cvs

2.include spring.core,spring.web in your new web app

3.change your web.config like:

<configuration>
    <configsections>
        <sectiongroup name="spring">
            <section name="context" type="spring.context.support.contexthandler, spring.core"/>
        </sectiongroup>
    </configsections>

    <spring>
        <context type="spring.context.support.webapplicationcontext, spring.web">
            <resource uri="~/spring-objects.xml"/>
        </context>
    </spring> 
  
  <system.web>

   <httphandlers>
        <add verb="*" path="*.aspx" type="spring.web.support.pagehandlerfactory, spring.web"/>
    </httphandlers>

    //.....default web.config begin.....
    <compilation     defaultlanguage="c#"     debug="true"   />
     .....

4.in the root, add a file: spring-objects.xml (defined in web.config <context type>...). like:
<?xml version="1.0" encoding="utf-8" ?>
 <objects>
<object id="masterpage" type="~/master.aspx" />
  <object id="basepage" abstract="true">
      <property name="master">
          <ref object="masterpage"/>
      </property>
  </object>
  <object id="default" type="default.aspx" parent="basepage" />

  <object id=the_file_name type=the_full_name />

  <object id="messagesource" type="spring.context.support.resourcesetmessagesource, spring.core">
        <property name="resourcemanagers">
            <list>
                <value>springnet.web.ui.head, springnet.web.ui</value>
                <value>your_web_form_with_dir_name,your_assembly</value>
            </list>
        </property>   
    </object>
</objects>

5.add a asp:label in your default.aspx, named label1;

6. chang in default.aspx.cs:
public class default:system.web.ui.page => public class default: spring.web.ui.page

7.add in your resource files: label1.text = chang_to_localized_text

8. then, your are at the end:
files you need:
/web.config
/spring-objects.xml
/default..zh-cn.resx
/default.en-us.resx
/default.aspx.resx
/default.aspx.cs
/default.aspx


  • 本文來源于網頁設計愛好者web開發社區http://www.html.org.cn收集整理,歡迎訪問。
  • 發表評論 共有條評論
    用戶名: 密碼:
    驗證碼: 匿名發表
    主站蜘蛛池模板: 涟水县| 综艺| 铜梁县| 安丘市| 门源| 德清县| 彭泽县| 芮城县| 舞钢市| 应用必备| 麟游县| 游戏| 准格尔旗| 邵阳县| 酒泉市| 云阳县| 京山县| 治县。| 云梦县| 饶阳县| 侯马市| 成都市| 宁蒗| 巩义市| 平凉市| 恩施市| 甘孜| 双鸭山市| 韶山市| 龙里县| 北川| 大安市| 漳浦县| 江西省| 高淳县| 内丘县| 诸城市| 阳信县| 新疆| 留坝县| 博爱县|