all groups > asp.net building controls > september 2004 >
You're in the

asp.net building controls

group:

Placement of Controls


Placement of Controls et
9/25/2004 9:32:15 AM
asp.net building controls: I have placed 3 web user controls on a page, a header, a navigation and a
products control. Each control is contained in a row and cell in a table.

The header and navigation controls work fine, but the products control is
displayed at the top of the page instead of inside the table. I have some
labels on the products control that is displayed correctly in the table on
the main page, but the product list I get from a dataset is displayed at the
top of the page with the header and navigation controls way down at the end
of the page. Why is this and what do I do about it.

Re: Placement of Controls John Saunders
9/26/2004 12:03:11 PM
[quoted text, click to view]

It's hard to know what the problem is when you haven't posted any code or
HTML.

Do you have any absolute positioning in the controls which are placed badly?

BTW, I doubt that the fact that you get the data from a dataset has anything
to do with the positioning of the controls!
--
John Saunders
johnwsaundersiii at hotmail

Re: Placement of Controls Carter
9/27/2004 11:46:16 AM
Thanks for your help. My code contains very little; the text "This is my
products page" is displayed at the top of the page above the header instead
of as part of the table:

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="default.aspx.vb"
Inherits="clients._default"%>
<%@ Register TagPrefix="uc1" TagName="ctlNavigation"
Src="ctlNavigation.ascx" %>
<%@ Register TagPrefix="uc1" TagName="ctlHeader" Src="ctlHeader.ascx" %>
<%@ Register TagPrefix="uc1" TagName="ctlLogon" Src="ctlLogon.ascx" %>
<%@ Register TagPrefix="uc1" TagName="ctlProducts" Src="ctlProducts.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>Water Management Information System</title>
<meta content="Microsoft Visual Studio .NET 7.1" name=GENERATOR>
<meta content="Visual Basic .NET 7.1" name=CODE_LANGUAGE>
<meta content=JavaScript name=vs_defaultClientScript>
<meta content=http://schemas.microsoft.com/intellisense/ie5
name=vs_targetSchema>
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id=frm1 runat="server">
<table borderColor=blue width="100%" border=1>
<tr>
<td><asp:panel id=pnlHeader
runat="server"><uc1:ctlHeader id=CtlHeader1
runat="server"></uc1:ctlHeader></asp:panel></td></tr>
<tr>
<td><asp:panel id=pnlLogon
runat="server">Logon Panel <uc1:ctlLogon id=CtlLogon1
runat="server"></uc1:ctlLogon><asp:Button id=Button1 runat="server"
Text="Button"></asp:Button></asp:panel></td></tr>
<tr>
<td><asp:panel id=pnlNavigation
runat="server">Navigation Panel <uc1:ctlNavigation id=ctlNavigation
runat="server"></uc1:ctlNavigation></asp:panel></td></tr>
<tr><td>
<asp:Panel id=pnlProducts runat="server">
<uc1:ctlProducts id=ctlProducts runat="server"></uc1:ctlProducts>
</asp:Panel>

</td></tr>
</table>
</form>
</body>
</HTML>


default.aspx.vb

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Response.Write("This is my products page")

End Sub







[quoted text, click to view]

AddThis Social Bookmark Button