在Web.config,ASP.Net中以编程方式添加位置部分 [英] Adding Location Section Progrmmaticallyin Web.config, ASP.Net

查看:59
本文介绍了在Web.config,ASP.Net中以编程方式添加位置部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在以编程方式生成一些aspx页面.现在,我需要将这些页面添加为web.config文件中的公共文件,如

Hi All ,

I am generating some aspx pages programmatically. Now I need to add these pages in the web.config file as public like,

<location path="Page.aspx">
        <system.web>
            <authorization>
                <allow users="*"></allow>
            </authorization>
        </system.web>
    </location>



通过代码生成页面时,如何在web.cofig文件中添加此部分.每当在页面生成按钮上以编程方式单击时生成页面时,每次都需要在web.cofig文件中添加以上部分.


谢谢,



How can I add this section in my web.cofig file while my page is generating through code. I need to add the above section in web.cofig file for every time whenever a page is generated on the Page Generate Button Click programmatically.


Thanks,

推荐答案

HI,您可以参考此网站阅读和编写app.config或web.config设置-只需 [ ^ ]
HI you can refer this site Reading and Writing app.config or web.config Settings - Simply[^]


这篇关于在Web.config,ASP.Net中以编程方式添加位置部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆