0
內的app_code功能,這是我在web.config中使用的代碼:ASP.NET C#:我怎麼能說的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函數在我運行頁面時沒有被調用。
任何幫助表示讚賞,
Simplecode