Groups | Blog | Home
all groups > asp.net webcontrols > july 2003 >

asp.net webcontrols : Design time postion of custom control??



Harry Simpson
7/21/2003 10:40:24 AM
Simple question for you veterans...

My test page has two controls and they are laid out in VS2003 designer as
follows:

<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<cc2:Multiplier id="Multiplier1" style="Z-INDEX: 101; LEFT: 96px;
POSITION: absolute; TOP: 260px"
runat="server" Width="266px" Height="30px"></cc2:Multiplier>

*******************************************
my custom control below
*******************************************

<cc1:WaitControl id="WaitControl2" style="Z-INDEX: 102; LEFT: 54px;
POSITION: absolute; TOP: 118px"
runat="server"></cc1:WaitControl>
</form>

BUT - during runtime the controls are side by side as if the page is set to
"FlowLayout" or at least as if the TOP attribute were the same for both
controls.

For a custom control, isn't the placement of that control saved and used
during runtime?

If not, how can I set the placement of the custom control, in this case an
image control?

Thanks
Harry


Harry Simpson
7/21/2003 3:36:24 PM
Does no one know the answer to this??

Harry

[quoted text, click to view]

Dawn Baker
7/21/2003 10:08:01 PM
You should be able to step through your code and see what the properties
of your controls are doing, if they're getting changed during rendering.

I have had inconsistent behavior in the style attributes entered on the
html page for web controls - visual studio just deletes it for me (so
kind of them).

You can also set the style properties at runtime with
ControlName.Style.Add("LEFT", "8px");
ControlName.Style.Add("TOP", "75px");

Hope that helps,
Dawn.


*** Sent via Developersdex http://www.developersdex.com ***
AddThis Social Bookmark Button