Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Web user control doesn't let me move objects 2

Status
Not open for further replies.

randysmid

Programmer
Dec 12, 2001
801
0
0
US
Hi ALL,
I am a relative newbie to ASP.Net, but am having trouble creating a web user control for my standard form header. ASP.Net is not letting me move objects around on the form. I am thinking that I need GridLayout, but the Document properties doesn't show anything for this. As you know, the users MUST have everything placed perfectly.
TIA, Randy
 
You do not necessarily need GridLayout...post your page and maybe we can find the reason (e.g. absolute positioning)

Thanks,
Patrick Green
 
Patrick,
Where would I find the "absolute positioning" property?
TIA, Randy
 
When you place an object (for example a textbox) onto an asp.net form you typically get the following:

<asp:TextBox id="TextBox1" style="Z-INDEX: 101; LEFT: 352px; POSITION: absolute; TOP: 184px"
runat="server"></asp:TextBox>

This code:

LEFT: 352px; POSITION: absolute; TOP: 184px"

tells the object where it should be placed on the page...remove that and it ends up in the top left hand corner.
 
Ok,
This is what my html source looks like:

<%@ Control Language="c#" AutoEventWireup="false" Codebehind="Header.ascx.cs" Inherits="CharterSchools.Header" TargetSchema="
<P>
<asp:Label id="Label1" Font-Size="X-Large" Font-Bold="True" ForeColor="Red" Height="28px" Width="432px"
runat="server">California Charter Schools</asp:Label></P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Label id="Label2" ForeColor="Blue" Width="184px" runat="server" Font-Names="Century">CACharterSchools.org</asp:Label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Image id="Image1" Height="56px" Width="128px" runat="server" ImageUrl="file:///C:\Inetpub\</body>

TIA, Randy
 
The page should look like this then:

California Charter Schools
a bunch of spaces CACharterSchools.org a bunch of spaces and an image

My suggestion to you, would be to use a table to lay things out accordingly:

<table>
<tr>
<td colspan =2>California Charter Schools</td>
</tr>
<tr>
<td width="25%">&nbsp;</td>
<td width="15%">CACharterSchools.org</td>
<td width="70%">image</td>
</tr>
</table>
 
Great idea, I will try it now!!! And a star for all your effort!!
Thanks a bunch, Randy
 
Hi,
I've inserted a table, but for some reason, ASP.net isn't letting me move the table up into the absolute top left corner.
TIA, Randy
 
I've inserted a table, but for some reason, ASP.net isn't letting me move the table up into the absolute top left corner.
How are you tying to "move" the table? Do you mean in the desinger window? If so, and you are still in FlowLayout mode, I would suggest using the HTML tab as opposed to the designer. You will be able to "place" the table just under the body tag, and it will be rendered first and therefore it will be in the top-left corner. Place any other objects within the table and you can start to build rows and columns onto that table to make the page look how you want (exactly how you would have done if you were simply making a HTML page).

Hope this helps.



----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
CA8MSM,
Your suggestion works!!! Thanks for the tip!!! ....and a star for your invaluable tip!!!
Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top