Adding dynamic links using NavigateURL on ASP.NET (VB)
Posted
by AZIRAR
on Stack Overflow
See other posts from Stack Overflow
or by AZIRAR
Published on 2010-06-16T23:26:24Z
Indexed on
2010/06/16
23:32 UTC
Read the original article
Hit count: 493
Hello,
I Have this code in my page, and I want that every NavigateUrl display another page like :
simple.aspx?id=1
, simple.aspx?id=2
, ...
Where id = c
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Dim c As Integer = 0
While c < 5
Dim Label1 As New Label()
Dim ltr As New Literal()
Dim link As New HyperLink()
link.NavigateUrl = "simple.aspx"
link.BackColor = Drawing.Color.Aqua
Label1.Text = c.ToString()
ltr.Text = "<br/>"
PlaceHolder1.Controls.Add(Label1)
PlaceHolder1.Controls.Add(link)
PlaceHolder1.Controls.Add(ltr)
c += 1
End While
End Sub
Thanks.
© Stack Overflow or respective owner