473,395 Members | 1,756 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

User Control definitions

User VS 2003, I would like to use User Controls to control the page look
with 3 User Controls (...PageTop.ascx, ...NavigateTop.ascx and
PageBottom.ascx). I would put the Content User control between the
NavigateTop and PageBottom User controls.

These files be something like: sdhcPageTop.ascx, ft2PageTop.ascx,
sbPageTop.ascx, macPageTop.ascx etc. I would have the same files for the
NavigateTop.ascx and PageBottom.asc.

The ones that load is dependant on who is logging on.

I have a file that really does nothing but load the controls.

I have 2 problems I have run into.

1) I would like to put the <body> tag into the PageTop.ascx file as that
will change dependant on who logs on. For example, if I am loading the
"sdhc..." files, I would have a different body tag than if I loaded the
"ft2..." files.

The problem is that if the </body> is not in the same .ascx file, I get an
error saying:

Unexpected end of file looking for </body> tag.

So I now have it in my main page.

Is there a way around this?

2) The other problem is that I would like to load the 4 different User
controls dependant on who logs on:

The file looks something like:

************************************************** ****************************
<%@ Page Language="VB" trace="false" debug="true" ContentType="text/html"
ResponseEncoding="iso-8859-1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ Register TagPrefix="fts" TagName="Logon" Src="../applicant/logon.ascx"
%>
<%@ Register TagPrefix="fts" TagName="Top" Src="sdhcPageTop.ascx" %>
<%@ Register TagPrefix="fts" TagName="Navigate" Src="sdhcNavigateTop.ascx"
%>
<%@ Register TagPrefix="fts" TagName="Bottom" Src="sdhcPageBottom.ascx" %>
<%@ Register TagPrefix="fts" TagName="Top" Src="ft2PageTop.ascx" %>
<%@ Register TagPrefix="fts" TagName="Navigate" Src="ft2NavigateTop.ascx" %>
<%@ Register TagPrefix="fts" TagName="Bottom" Src="ft2PageBottom.ascx" %>
<%@ Register TagPrefix="fts" TagName="Top" Src="sbPageTop.ascx" %>
<%@ Register TagPrefix="fts" TagName="Navigate" Src="sbNavigateTop.ascx" %>
<%@ Register TagPrefix="fts" TagName="Bottom" Src="sbPageBottom.ascx" %>
<html>
<head>
<title>:: Staffing Workshop ::</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<body id="myBody" bgcolor="#FFFFFF" text="#000000"
background="/images/sdhc/sdhcgiwave11.gif" leftmargin="0" topmargin="0"
marginwidth="0" marginheight="0" link="#006699" vlink="#660033"
alink="#CC9966" runat="server">
<form id="addForm" runat="server">
<fts:Top runat="Server"/>
<fts:Navigate runat="Server"/>
<fts:Logon runat="Server"/>
<fts:Bottom runat="Server"/>
</form>
</body>
</html>
************************************************** ******************************

I know this won't work, but I am just illustrating what I am trying to
achieve

All my pages would look the same except that first Custom Control would be
different (this is the content control). One for logon, one for searchlist,
one for adding new people etc.

How do I handle the loading of the different Controls programmatically and
do I need to define each file in this page?

I would like not to have to define each set of 3 controls on each page.
That would mean that everytime a new user came up, I would have to add 3 new
controls to each page.

With include files, it would work fine, but I would like to use User
Controls instead.

Thanks,

Tom


Jun 24 '06 #1
0 1061

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Vincent Finn | last post by:
Hi, I am writing a Control (in C#) and I want to give the user access to an array of items in it. If I make a property that returns the array it doesn't work properly in the designer. The...
3
by: Mr Newbie | last post by:
I am messing around with Web User Controls at present and (think) I have discovered the following. 1.) The identifier for the control in the code behind must match the ID for the control on the...
2
by: Electrified Research | last post by:
The new ASP.NET 2.0 Menu control seems to have some very cool features. But there are some things I don't like. Heavy implimentation of inline style. Some of which I cannot remove. The <a> tags...
9
by: Alan Silver | last post by:
Hello, I have a user control which I am trying to load dynamically, but am running into problems. I think the problem is because I have two .ascx files that refer to the same .ascx.cs file. A...
0
by: Fabuloussites | last post by:
I have a user control that i need to do some processing in a fuction when it is first loaded. I have tried to add my code to the page_load and page_init fuctions. when i run a debugger, i notice...
0
by: Brian Cesafsky | last post by:
I am using framework 1.1 I have a user control and a web page. I want to set up properties on the user control, so I can access the text boxes on the user control when I am in the code behind...
0
by: Brian Cesafsky | last post by:
I am using framework 1.1 I have a user control and a web page. I want to set up properties on the user control, so I can access the text boxes on the user control when I am in the code behind...
2
by: tshad | last post by:
User VS 2003, I would like to use User Controls to control the page look with 3 User Controls (...PageTop.ascx, ...NavigateTop.ascx and PageBottom.ascx). I would put the Content User control...
4
by: simon | last post by:
hello. relatively new to vb.net, i'm using VS 2003 and .net 2.0 i have a web app that i'm i have a user control that displays a simple 1 row table as the header of the page. the user control...
9
by: J055 | last post by:
Hi I have a standard asp page which uses a MasterPage. The MasterPage contains a User control. How can I access a public method in the User control from my WebForm page? I can't move the method...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.