Setting Web Form Appearance

4 posts, 0 answers
  1. William Corry
    William Corry avatar
    21 posts
    Member since:
    Feb 2009

    Posted 24 Apr 2009 Link to this post

    The only way I've found of controlling the placement of controls on a Web Form is to create a table and place the controls within the cells of the table.  In other environments it is possible to simply move the control onto a form and it stays in the position it was placed.  Is there a way to do this with Ajax Web Forms?  I saw a video that showed use of the layout menu option in Visual Studio but I haven't seen that menu option for the Ajax Web Form.

  2. ManniAT
    ManniAT avatar
    885 posts
    Member since:
    Nov 2003

    Posted 24 Apr 2009 Link to this post


    you can achive absolute positioning in VS very easy.
    Create a new page. With the cursor on your div (is autmatically created) choose Format/Position... and the Absoulte.
    Next (in design mode) drag the size of the div to give you enough space.
    Place a control in the div (drag from Toolbox) and again choose "Position Absolute" - drag the control to what ever place you want.
    The following code shows the result:
      <div style="z-index: 1; left: 10px; top: 15px; position: absolute; height: 286px; width: 1873px">  
            <asp:TextBox ID="TextBox1" runat="server" ontextchanged="TextBox1_TextChanged" style="z-index: 1; left: 407px; top: 169px; position: absolute"></asp:TextBox> 
    You can copy it to a new page an see who it works.

    In VS - options there is a setting (I can just guess the names since my VS is german) at:
    Extras (tools I think)
    HTML Designer (left in the tree)
    CSS Styles (the fourth entry)
    For controls ... via Toolbox or paste or drag and drop.... use absolute positioning.
    Set this checkbox - so absolute positionin will be default.


  3. Svetlina Anati
    Svetlina Anati avatar
    2795 posts

    Posted 24 Apr 2009 Link to this post

    Hello William,

    I assume that you have seen the VS 2003 with page layout set by using ms_positioning set to grid layout. However, this functionality relied on absolute positioning and since it leads to different results under different browsers, it was removed for VS 2005 and later.

    You can use different techniques to build your layout - most of them are available on the web:

    and we recommend to examine them and choose what is most suitable for your exact scenario and requirements.

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  4. William Corry
    William Corry avatar
    21 posts
    Member since:
    Feb 2009

    Posted 24 Apr 2009 Link to this post

    Thanks, Svetlina/Manfred  that's what I was looking for.
Back to Top