|
-
Oct 29th, 2002, 10:30 AM
#1
Thread Starter
Lively Member
.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
-
Oct 29th, 2002, 01:34 PM
#2
Junior Member
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
-
Oct 30th, 2002, 08:37 AM
#3
Thread Starter
Lively Member
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" %>
<asp ropDownList 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>
</asp ropDownList>
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
-
Oct 30th, 2002, 09:37 AM
#4
Junior Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|