具有相同键名但值不同的Web配置.... [英] Web config with same key name but different value....
本文介绍了具有相同键名但值不同的Web配置....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在一个应用程序中,我有2个web.config文件(一个位于根目录,另一个位于子节点).
在这两个Web配置中,我定义了相同的键名,但具有不同的值.
因此,要在代码后面调用子级web.config键值,该怎么办?
请让我知道.
有人问我,但我无法回答.
谢谢,
Chin
In an application I have 2 web.config files (one is at root and other is at child node).
In both web configs I have defined same key name but with different values.
So to call child web.config key value in code behind what have I to do?
Please let me know.
Somebody asked me but I am unable to give answer.
Thanks,
Chin
推荐答案
您将需要创建一个自定义的节处理程序来处理
与您的自定义标签.
例
You''ll need to create a custom section handler to deal
with your custom tags.
Ex
<yourcustomconfigsection>
<customers>
<customer name="Customer1" somesetting="A" another="1" />
<customer name="Customer2" somesetting="B" another="2" />
<customer name="Customer3" somesetting="C" another="3" />
</customers>
</yourcustomconfigsection>
Use Google
有人请告诉我我将如何做...
问题:现在Microsoft控件正在显示在设计页面中,如
asp:button假设六个月后微软将其更改为aspppp:button.
通常它可能不会发生.如果发生了,那么您如何管理应用程序就不会显示任何问题.
谁能给我任何想法,我将如何从头开始,不会有任何变化.
谢谢.
Chinn
Anybody please tell me how i will do it...
Question :Now Microsoft control is showing in design page like
asp:button suppose after 6 month Microsoft changed it aspppp:button.
Genrally it may not happen.if happened then how you manage your application that it will not show any problem.
Could anybody give me any idea how i will start it from first that any changes will come it will not affect.
Thnks.
Chinn
请将新问题发布为新帖子,以便正确跟踪.
您已经在aspx中为要添加到aspx的用户控件注册了一个标签.标签前缀的名称很重要.修改标签前缀以进行编译
<![CDATA [<%@注册TagPrefix ="UC" TagName ="OfDateTime" Src =〜/UserControls/TimeAnalyzer.ascx"%>
控制代码:
< uc:ofdatetime id ="mdtFilterStart" runat ="server"/>
Kindly post new question as a new post inorder to track properly.
You have a tag getting registered in your aspx for a user control that you add to aspx.Name of tag prefix is that matters.Modify tag prefix in order to compile
<![CDATA[<%@ Register TagPrefix="UC" TagName="OfDateTime" Src="~/UserControls/TimeAnalyzer.ascx" %>
Control code:
<uc:ofdatetime id="mdtFilterStart" runat="server" />
这篇关于具有相同键名但值不同的Web配置....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文