Reputation: 251
I have the following HTML in a jQuery Data Template:
<a class="comment" style = "text-decoration:underline" href="ItemTitle/${Application.ApplicationId}/${Application.ApplicationName}/${DomainObjectId}/${DomainObjectPropertyNameFormatted}">${DomainObjectPropertyValue}</a>
As is above the template gets rendered on the ItemTitle view and produces a URL that appends all the URL elements to it. If I add a "/" before "ItemTitle" it goes to the root IIS website. I cannot use a html helper like Html.ActionLink because the template is only rendered after the page has loaded.
How can I get it to navigate to the correct URL?
Upvotes: 0
Views: 140
Reputation: 9692
Just create a variable with the dev url in it.
For example:
$FullURL = 'http://[some ip]/[path]';
And include it in your a href's like: href="<%=FullURL%>/ItemTitle/${Application.ApplicationId}.. etc".
When you change from development to production, simple change the $FullURL variable.
Upvotes: 1