Placement of Controls

E

et

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.
 
J

John Saunders

et said:
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.

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!
 
C

Carter

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top