creation of a set of dynamic hyperlink controls into a page

C

Carlos

Hi all,

I need to create a set of dynamic hyperlinks in a page.

I got:
PlaceHolder mainpanel = new PlaceHolder();

foreach (DataRow row in events_table.Rows)

{

string option = "";

option = row.ItemArray[0];

HyperLink myHL = new HyperLink();

myHL.NavigateUrl = "http://www.mysite.com?opt="+option;

myHL.Text = "my option="+option;

myHL.Visible = true;

myHL.ForeColor = System.Drawing.Color.Navy;

myHL.Height = 12;

mainpanel.Controls.Add(myHL);



}

This does not display anything YET.. Thanks in advance.



Carlos.
 
F

Felix Piskunov

I don't add mainpanel to a page, so offcourse you can't see that.
P.S. Give ID to myHL
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top