I solved the problem after I wrote the question...here is how I did it...in the transformation (which is where the link exists that I want to set the Href for), I added some code like this:
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
// Find the server name on the previous page
string previousPageURL = Request.UrlReferrer.ToString();
System.Web.UI.HtmlControls.HtmlAnchor topAnchor = (System.Web.UI.HtmlControls.HtmlAnchor)FindControl("backToResultsTop");
System.Web.UI.HtmlControls.HtmlAnchor bottomAnchor = (System.Web.UI.HtmlControls.HtmlAnchor)FindControl("backToResultsBottom");
if (!string.IsNullOrEmpty(previousPageURL))
{
topAnchor.HRef = previousPageURL;
bottomAnchor.HRef = previousPageURL;
}
else
{
topAnchor.HRef = "~/Calendars.aspx";
bottomAnchor.HRef = "~/Calendars.aspx";
}
}
</script>
I had a bottom and a top link that did the same, thus the two settings for the bottom and top anchor tags. :) Works like a charm. Might want to add some logic to avoid external referals from breaking things but otherwise using some inline code worked.