Design time postion of custom control??

Discussion in 'ASP .Net Web Controls' started by Harry Simpson, Jul 21, 2003.

  1. 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, Jul 21, 2003
    #1
    1. Advertising

  2. Does no one know the answer to this??

    Harry

    "Harry Simpson" <> wrote in message
    news:...
    > 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, Jul 21, 2003
    #2
    1. Advertising

  3. Harry Simpson

    Dawn Baker Guest

    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 ***
    Don't just participate in USENET...get rewarded for it!
     
    Dawn Baker, Jul 22, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vishal
    Replies:
    0
    Views:
    549
    Vishal
    Nov 14, 2003
  2. Replies:
    0
    Views:
    732
  3. Guoqi Zheng

    repeater control addat method postion.

    Guoqi Zheng, Jul 26, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    492
    Guoqi Zheng
    Jul 26, 2004
  4. semesm22

    postion user control dynamically

    semesm22, Dec 14, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    410
    semesm22
    Dec 14, 2005
  5. Replies:
    1
    Views:
    395
    Teemu Keiski
    Jul 2, 2003
Loading...

Share This Page