Need ASP URL Help

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 лет назад
I'm modifying the template OneVariant.aspx and I would like to include a link at the top of the page that will bring you down to the ProductsTabs.

Setting the NavigateURL in the codebehind to "#ProductsTabs" doesn't work

hlXXXX.NavigateURL = "#ProductsTabs"
resolves to "www.mydomain.com/templates/products/#ProductsTabs"

hlXXXX.NavigateURL = Page.ResolveURL("#ProductsTabs")
also doesn't work as it resolves to "www.mydomain.com/#ProductsTabs"

I need it to resolve to
www.mydomain.com/product/1-product-name-here.aspx#ProductsTabs

Can someone help me out?

Thanks,
Steve.

Edit:
Also, how would I resolve an address to a image in the App_Themes directory from code for OneVariant?
13 лет назад
Use the methods in SEOHelper (SEOHelper.GetProductUrl off the top of my head) to build your link and append your page anchor.

so something like

myLink.NavigateUrl = SEOHelper.GetProductUrl(this.ProductId) + "#anchor";

HTH
13 лет назад
That's what I needed.  Thanks!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.