Jump to content
Xtreme .Net Talk

Recommended Posts

  • Moderators
Posted

you can use the following code...

You'll need to get the NavigationURL from either a data store or an Array of some sort.

   Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
       If Not IsPostBack Then
           createManyControls()
       End If
   End Sub

   Private Sub createManyControls()
       Dim x As Integer

       For x = 0 To 10
           Dim h As New HyperLink()
           With h
               .BorderColor = Color.Red
               .BorderStyle = BorderStyle.Solid
               .BorderWidth = Unit.Pixel(1)
               .Text = "Test this site"
               .NavigateUrl = "someURL"
               .CssClass = "SomeCssClass" 'If you wish, use this instead of the properties
           End With
           Me.Controls.Add(h) 'or place the controls into a Panel or PlaceHolder
       Next
   End Sub

Visit...Bassic Software

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...