Adding New Controls to a Placeholder

J

Jim Heavey

If I have a Placeholder in which I want to add controls to it based upon
some action.

If I add a ASP.Net Table and create a Row and then a Cell and add a Link
Button to that cell.

My questions are:
1. I just want to confirm my code for adding a control into a cell and
setting the event handler for that control. Say the control I am adding to
a TableCell is a LinkButton. I did the following:
cell1.Controls.Add(lnk1);
lnk1.Click += new System.EventHandler(this.lnkEditProcesser_Click);
Is this correct?

2. If after building the table (in the placeholder), I wanted to place a
"<BR>" after the table control, but still in the placeholder. How do I add
a "<BR>" to the Panel. Can I create a "Literal" control and load it with
"<BR>", will this work?

Thanks in advance for your assistance!!!!!!!
 

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

Top