Results 1 to 4 of 4

Thread: .net Web Control Positioning!!!

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2001
    Location
    MA, US
    Posts
    78

    .net Web Control Positioning!!!

    Hi,

    I try to use an user control on an aspx page. I defined the control ( and dropdown list with all the states in USA), but when I trie to use it in an aspx page it does not show on the place where I want. it show at the begining of the page. The control if functioning corectlly, the position where the control is showing is not correct.
    Does anybody know how can an User control can appear at a certain position.

    Thank you,

    Sorin

  2. #2
    Junior Member
    Join Date
    Jun 2002
    Location
    Chicago
    Posts
    30

    position

    If user are using a user control - just treat it like an html tag

    Also check to see if you have Flow Layout or Grid layout set - this will make a diffenece on how everything looks

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Oct 2001
    Location
    MA, US
    Posts
    78
    Hi,
    I changed the layout type, but the problem is the same:
    Here is my control(partial):
    <%@ Control Language="vb" AutoEventWireup="false" Codebehind="StateControl.ascx.vb" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
    <aspropDownList id="lstStates" runat="server">
    <asp:ListItem Value="AL">Alabama</asp:ListItem>
    <asp:ListItem Value="AK">Alaska</asp:ListItem>
    <asp:ListItem Value="AZ">Arizona</asp:ListItem>
    <asp:ListItem Value="AR">Arkansas</asp:ListItem>
    </aspropDownList>
    Here is the main aspx page where I use the control:
    <%@ register tagprefix="USA" tagname="States" src="StateControl.ascx" %>
    ...
    <asp:Button id="Button1" style="Z-INDEX: 137; LEFT: 327px; POSITION: absolute; TOP: 495px" runat="server" Text="Continue"></asp:Button>
    <USA:States id="ctlCustState" style="Z-INDEX: 136; LEFT: 425px; POSITION: absolute; TOP: 332px" runat="Server" />
    <asp:TextBox id="txtBillPhone" style="Z-INDEX: 135; LEFT: 425px; POSITION: absolute; TOP: 397px" runat="server"></asp:TextBox>
    ...
    I wanted that the control to show in between the other two controls (see style): in desigh mode show into the right position
    , but into the browser show at the top of the screen.

    Any ideea,

    Thank you,

    Sorin

  4. #4
    Junior Member
    Join Date
    Jun 2002
    Location
    Chicago
    Posts
    30

    absoulte positoning

    change the layout to flowLayout(normal HTML) - then remove all off the absoulte positoning of your contorls - then you should be able to arrange them like normal html tags

    MS defaults to grid layaout and forces absoulte positoning on all of the controls - I hate this, change to flow layout before developing and then the positoning will stop

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width