Just wondering if this is even doable. I've got 3 environments for a C#/ASP.Net project I'm working on; Development, Staging and Production. One recent development is that my users want a link to an outside reporting app. The reporting app also has 3 environments, so every time I copy the C#/ASP out to one of those servers, I have to remember to change the links.
So, imagine a hyperlink that looks like this:
<asp:HyperLink id="ReportLink" ForeColor="Snow" NavigateUrl="https://d-mysite.com/cgi-bin/rpt.dll?b_action=Viewer" Text="Go To My Reports" Target="_new" runat="server"/>
After it's tested in Development, I have to remember to change the URL to https://s-mysite.com before I publish to Staging, and then https://p-mysite.com before I publish to Production.
Is there any way to determine which server it's running off of, so that I can use an IF statement to determine which link to use?