• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

sternyy
#1 Posted : Tuesday, March 3, 2009 5:45:58 PM(UTC)
sternyy

Rank: Member

Joined: 1/10/2005(UTC)
Posts: 714

Thanks: 14 times
Was thanked: 1 time(s) in 1 post(s)
I am trying to get my small image url in <link id="ImageLink" rel="image_src" href="" /> in my header on my product page. So far I was successfuly in getting the Small Image URL in, but it adds the path to my style directory before it:




Code:

<link id="ctl00_ImageLink" rel="image_src" href="../BVModules/Themes/TekGearReduxII/images/Products/Autoclaves/Graham-Field-8375.jpg" />




It should look like this:





Code:

<link id="ctl00_ImageLink" rel="image_src" href="/Products/Autoclaves/Graham-Field-8375.jpg" />




This is from my BaseStorePage.vb





Code:

Public Property ImageLink() As String
Get
Dim m As HtmlControls.HtmlLink = Page.Header.FindControl("ImageLink")
If m IsNot Nothing Then
Return m.href
Else
Return String.Empty
End If
End Get
Set(ByVal value As String)
Dim m As HtmlControls.HtmlLink = Page.Header.FindControl("ImageLink")
If m IsNot Nothing Then
m.href = value
End If
End Set
End Property
Aaron
#2 Posted : Wednesday, March 4, 2009 2:52:59 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Bryan,

I believe the problem is the automatic pathing that .NET does when there is a runat="server" on the <head> tag. What you will probably need to do is pass a fully qualified URL to the property rather than a relative or absolute one.

Just curious, what are you trying to achieve with <link> element?
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
sternyy
#3 Posted : Wednesday, March 4, 2009 3:24:12 PM(UTC)
sternyy

Rank: Member

Joined: 1/10/2005(UTC)
Posts: 714

Thanks: 14 times
Was thanked: 1 time(s) in 1 post(s)
ya know... I've noticed a lot of retail websites starting to provide "social bookmarking" links on their product pages to be posted to sites like facebook.com and digg.com. Facebook uses information from the meta tags and link tags in the header so it knows what the product name, product description and product image. It pulls the info automatically so the person "bookmarking" the product doesnt have to re-type anything.

Its just another way to share products with people.
sternyy
#4 Posted : Wednesday, March 4, 2009 3:25:10 PM(UTC)
sternyy

Rank: Member

Joined: 1/10/2005(UTC)
Posts: 714

Thanks: 14 times
Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: "Aaron" Go to Quoted Post

Bryan,

I believe the problem is the automatic pathing that .NET does when there is a runat="server" on the &lt;head&gt; tag. What you will probably need to do is pass a fully qualified URL to the property rather than a relative or absolute one.
How do i pass that rather than an absolute or relative?
Aaron
#5 Posted : Wednesday, March 4, 2009 3:29:04 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Oh, cool! I always wondered how they did that but never bothered to look into it. I figured it was done with RSS. Thanks!
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
Aaron
#6 Posted : Wednesday, March 4, 2009 3:32:36 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Try this. You may have to mess with it a little bit, but you get the idea.

Code:

Public Property ImageLink() As String
Get
Dim m As HtmlControls.HtmlLink = Page.Header.FindControl("ImageLink")
If m IsNot Nothing Then
[b]Return WebAppSettings.SiteStandardRoot & m.href[/b]
Else
Return String.Empty
End If
End Get
Set(ByVal value As String)
Dim m As HtmlControls.HtmlLink = Page.Header.FindControl("ImageLink")
If m IsNot Nothing Then
m.href = value
End If
End Set
End Property
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012