Hi. i have created a textbox and a button for my page. I want to create a hyperlink everytime a button is clicked. The hyperlink will be displayed in a placeholder. however, whenever i add another hyperlink, the previously created hyperlink will just be replaced by the new hyperlink. What code should i add so that the new created hyperlink will just be added in the placeholder, not just replacing the hyperlink there? or is there another approach to do so? please help me out.
This is my code.
This is my code.
Code:
Dim link As New HyperLink()
Dim ltr As New Literal()
link.ID = 1
link.Text = TextBox1.Text
link.NavigateUrl = "Default.aspx?field1=" + TextBox1.Text + " "
ltr.Text = "<br/>"
PlaceHolder1.Controls.Add(ltr)
PlaceHolder1.Controls.Add(link)