【发布时间】:2011-07-19 01:38:23
【问题描述】:
这是我在 web.config 中使用的代码:
<add name="MainRule" virtualUrl="^~/Pages/([\w-_]+).html"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="~/page.aspx?pid=${PageTitleToId.ConvertPageTitleToPageId($1)}"
ignoreCase="true" />
在 App_Code 文件夹中,我有一个“PageTitleToId.cs”类,其中包含带有字符串参数的 ConvertPageTitleToPageId 函数。
我是否遗漏了什么,因为在我运行页面时未调用 ConvertPageTitleToPageId 函数。
感谢您的帮助,
简单代码
【问题讨论】:
标签: c# asp.net web-config global app-code