11月22
[转]urlrewriter时Theme失效的解决办法
分类:ASP.NET|评论:0 条|阅读:1690 次|posted @ 2007年11月22日 13:34:59重写Page的OnInitComplete方法:
protected override void OnInitComplete(EventArgs e)
{
base.OnInitComplete(e);
foreach (Control ctr in this.Header.Controls)
{
if (ctr is HtmlLink)
{
HtmlLink link = ctr as HtmlLink;
link.Href = this.ResolveUrl(link.Href);
}
}
}