R
Robson Carvalho Machado
Dear friends,
I'm dynamically creating a Hyperlink with spacer.gif as ImageURL that is an
1px transparent image only to determine link position, but as I create this
link dynamically I could not set image width. This problem makes my link
clickable only on its borders.
When viewing HTML source I could see that spacer.gif has no width and
height, so HTML shows only 1px x 1 px image.
What can I do to make all the area clickable?
CODEBEHIND
-----------------
Dim myHyperLink as HyperLink
myHyperLink = New HyperLink
myHyperLink.ID = "link1"
myHyperLink.ImageUrl = "spacer.gif"
myHyperLink.NavigateUrl = "default.aspx"
myHyperLink.Attributes("style") =
"style="border-width:1px;border-styleotted;height:40px;width:128px;Z-INDEX:
103; LEFT: 408px; POSITION: absolute; TOP: 208px"
PlaceHolder1.Controls.Add(myHyperLink)
HTML SOURCE GENERATED BY DYNAMIC LINK
I'm dynamically creating a Hyperlink with spacer.gif as ImageURL that is an
1px transparent image only to determine link position, but as I create this
link dynamically I could not set image width. This problem makes my link
clickable only on its borders.
When viewing HTML source I could see that spacer.gif has no width and
height, so HTML shows only 1px x 1 px image.
What can I do to make all the area clickable?
CODEBEHIND
-----------------
Dim myHyperLink as HyperLink
myHyperLink = New HyperLink
myHyperLink.ID = "link1"
myHyperLink.ImageUrl = "spacer.gif"
myHyperLink.NavigateUrl = "default.aspx"
myHyperLink.Attributes("style") =
"style="border-width:1px;border-styleotted;height:40px;width:128px;Z-INDEX:
103; LEFT: 408px; POSITION: absolute; TOP: 208px"
PlaceHolder1.Controls.Add(myHyperLink)
HTML SOURCE GENERATED BY DYNAMIC LINK