Link to blog pages on master page?

Topics: ASP.NET 2.0, Controls
Nov 29, 2009 at 12:48 PM

I'd like to add some links to a few very central pages in my site on to my master page.

It seems, however, that these pages aren't available as straight *.aspx pages in the file system, so I can't really just link to them using an <asp:HyperLink> control.

How can I define a standard ASP.NET link to a page called "statitistics.aspx" that I have created in BlogEngine.NET ? Is there some "magical" function that will give me the actual file for my link?

Nov 29, 2009 at 9:48 PM

You should be able to add a <asp:HyperLink> control to the site.master page.  The other option is to add <a> tags like how the existing hyperlinks in your master page are probably setup.  It would probably look like:

<a href="<%=Utils.AbsoluteWebRoot %>statistics.aspx">Statistics</a>