I'm trying to to create a link on one web application to another web application using C#.
Code is running on:
I want to create a link to http://my.
The farm is also available on a FQDN domain:
So what is the best code or control to create a link to the other AAM web application? At the moment I'm doing something like this:
<%= SPWebApplication.Lookup(
new Uri("http://my")).AlternateUrls.
GetResponseUrl(SPAlternateUrl.Lookup(
new Uri(SPContext.Current.Web.Url)).UrlZone).Uri %>
It works, but I'm not sure if this is the right and performant way.
Any ideas?