Re: Add control to a placeholder
From: Ken Cox [Microsoft MVP] (BANSPAMken_cox_at_sympatico.ca)
Date: 04/11/04
- Next message: Murphy: "RedirectFromLoginPage"
- Previous message: Charles A. Lackman: "Apostaphie"
- In reply to: Carlos Cruz: "Add control to a placeholder"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 11 Apr 2004 19:07:43 -0400
Hi Carlos,
You could add hyperlink controls and then a literal control containing a
<br> after each one like this:
Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
Dim intCounter As Integer
Dim hlnk As HyperLink
Dim litrl As Literal
For intCounter = 0 To 5
hlnk = New HyperLink
hlnk.NavigateUrl = intCounter.ToString & ".aspx"
hlnk.Text = "Link " & intCounter.ToString
litrl = New Literal
litrl.Text = "<br>"
PlaceHolder1.Controls.Add(hlnk)
PlaceHolder1.Controls.Add(litrl)
Next
End Sub
Does this help?
Ken
Microsoft MVP [ASP.NET]
"Carlos Cruz" <carlos.cruz@vianw.pt> wrote in message
news:OHbQcy$HEHA.3968@TK2MSFTNGP12.phx.gbl...
> hi,
>
> I want to add controls (hyperlinks) dynamically in code into a
> placeholder.
> I manage to add them but they appear in the same line and I want to show
> each hyperlink in a diferente line (like a left menu).
> How can I do this???
>
> Thanks
> CC
>
>
- Next message: Murphy: "RedirectFromLoginPage"
- Previous message: Charles A. Lackman: "Apostaphie"
- In reply to: Carlos Cruz: "Add control to a placeholder"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|