views:

155

answers:

1

Hi All,

I have a varying number of links that I need to add to a webpage using C#. A little background may help so, the ultimate goal of this is to have the user select an area of a map and choose the data they would like to get from this map. After the data reports have been generated, a link pops up for each area selected that is a download link for the report.

I can add new links fine, but I'd like to keep things centered on the page like the main control, but when I add a new hyperlink it keeps adding it to the left side. I have my page style set to centered and I don't see the option in a hyperlink object to set it's position. Is there any other way I can do this?

Forgive me but it's my first C# web app.

Thanks!

A: 

Make yourself a

<asp:PlaceHolder runat="server" id="plhFoo" />

In the location that you want to add your dynamic stuff to, and then add your controls to this, instead of the page.

-- Edit

If you want to position it, you may put a

<asp:Panel runat="server" ID="pnlFoo" CssClass="someclass" />

And style someclass; because the panel will render as a div.

Noon Silk
Perfect! Thanks :)
Fry