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
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