How to properly place controls on a ContenPlaceHolder

  • Thread starter namewitheldbyrequest
  • Start date
N

namewitheldbyrequest

When I create a web form in VS 2005 I have a problem. I created a
MasterPage with a ContentPlaceHolder object on it. Then I created a
detail page that refrenced the Master Page. When I drag controls onto
the ControlPlaceHolder on the Detail page, the controls end up at the
upper left corner of the page and I have to drag them down onto the
ControlPlaceHolder. The controls are coded in the HTML as position =
absolute and I don't think that's the most correct setting, but I'm not
sure. Should the controls be position = relative?

I don't understand the logic behind placing these controls and I can't
get them placed uniformly on the ControlPlaceHolder on the detail page.
When the page is rendered in the browser, some controls that were
located on the ControlPlaceHolder in desogn view will end up below the
ControlPlaceHolder.
I also don't know how to resize the ControlPlaceHolder from the Master
Page. What's the trick?

Thanks,

Bill
Cincinnati, OH USA
 
G

Guest

think of the controlplaceholder for your details page as the entire page.
basically all your content must go inbetween the opening and closing tag of
the contentplace holder in the details page.
also try not to put anything in the place holder of the masterpage unless
you really want to get confused.

as far as placing controls yes its best not to use absolute. Now placing
controls in the web world is not a simple fast task and some people spend a
great deal of their time just doing that proffesionally so alocate time for
that..;)

basically you need to use <div> and <table> and <asp:panel> stuff to place
things.
I use a ton of html tables and it takes awhile to learn how to use them.

try this for starters
<table align="center">
<tr>
<td>hi</td>
</tr>
</table>

if you already knew this I sorry
 

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