Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hyperlink with PlaceHolder

Status
Not open for further replies.

Bensta

Programmer
Jul 21, 2003
122
US
I built a user control that hold links to my asp.net pages. So I basically drop it on asp.net web form. I am using the Placeholder control as a container. The first two links work fine, but the other ones point to the same link as link number two. I have no idea what I am doing wrong here.
Here is the code:
Dim hypLink1 As New HyperLink
hypLink1.NavigateUrl= "Documentation/SystemHelpFiles.htm"
hypLink1.Text = "System Help Page<br>"
hypLink1.CssClass = "sidemenu_links"
hypLink1.Target = "_blank"
PlaceHolder1.Controls.Add(hypLink1)


Dim hypLink2 As new HyperLink


hypLink2.NavigateUrl = "ClosedTicketsReport.aspx"

hypLink2.Text = "Closed Tickets Report<br>"
hypLink2.CssClass = "sidemenu_links"
hypLink2.Target = "_blank"
PlaceHolder1.Controls.Add(hypLink2)

Dim hypLink3 As new HyperLink

hypLink3.NavigateUrl = "OpenTickets30Days.aspx"
hypLink3.Text = "Tickets Over 30 Days<br>"
hypLink3.CssClass = "sidemenu_links"
hypLink3.Target = "_new"
PlaceHolder1.Controls.Add(hypLink3)
ect..
Does anyone see what is wrong with this code?
I will appreciate any help.
Thank you
Bensta
 
Change

Code:
hyplink3.Target = "_new"

To

Code:
hyplink3.Target = "_blank"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top