![](/img/trans.png)
[英]C# - Dynamically add and remove items from ContextMenuStrip and “Smart Events”
[英]Smart way to add and remove URL rewrite rules in C# at runtime?
我的web.config中的一些靜態URL重寫部分:
<rewrite>
<rules>
<rule name="Cities" stopProcessing="true">
<match url="Cities/?$" ignoreCase="true" />
<action type="Rewrite" url="/Cities.aspx" appendQueryString="true" />
</rule>
</rules>
</rewrite>
我工作正常,但我想在運行時添加動態重寫規則。 有沒有一種聰明的方法可以在運行時在C#中添加和刪除URL重寫規則?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.