You create the hyperlink control then you add it to the container that is to display it. The code is placed in the Page Load event. In the example below, I am adding the hyperlink control to the Page object:
Dim MyHyperLink As New System.Web.UI.WebControls.HyperLink()
MyHyperLink.Text = "My Test"
MyHyperLink.NavigateUrl = "http://msn.com"
Me.Controls.Add(MyHyperLink)
>Hello,
>
> I am creating a website that has dynamic content. I want to only display certain links based on the user's security level. I am using hyperlink web form controls for the links. What do I have to do to add a control to a webform dynamically?
>
>1,000 Thanks
>
>Jim
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi