Short of parsing the ASPX page myself, what's the way to determine the class of an ASPX page?
In our projects we use Web Projects in VS2008 (instead of Web Sites kind or projects), that gives us a single DLL for the whole site, which is great.
Now I need to determine programmatically the class of an ASPX site.
I KNOW that the ASPX class has the same name of the aspx file (when created with VS), however, the filename may be renamed in production and hence blowing such code to smitherins.
All our ASPX pages starts with the basic @Page directive:
<%@ Page ... Inherits="_CLASS_NAME_GOES_HERE_" %>
So, short of parsing the directive myself, what other options do I have?
Edited to add:
Because we're using a third party software to manage our portal, it requires certain conditions.
I'm trying to create a custom Attribute to mark the pages as "safe" for the portal, and as such all our links between pages need to be parsed through a function that needs to analyse if the destination page is safe.
Edited to clarify
I see that the question may not be as clear as I thought it was, then let me try to clarify it a bit:
Say we have a relative URL to an specifc page, for instance "~/destination.aspx"
I need to determine the class of that page, based on it's URL.