I'm in the process of learning .net, and I need to get the URI of a specific webform.
The framework is asp.net 3.5
Example: I'm in AboutMe.aspx.cs and I need to find out what the URI of Contactme.aspx would be. Edit to clarify: I would give this method the path to Contactme.aspx --> "~/Contactme.aspx" and get "www.porcupine.com/Contactme.aspx"
The reason I'm trying to figure this out is that I want to render an email template page, that has specific variables per person, and then be able to copy the entire page into a string via WebClient().DownloadString() method. But this method requires the URI of the page to convert to string.
Does anyone know of a way to do this? Or of an ELEGANT alternative way to do this (i.e., without just writing out the entire page as the body of a message, etc.)?