473,387 Members | 1,516 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,387 software developers and data experts.

UserControl Code Libraries???

I want to create basic usercontrol code libraries. Is the
following possible? If so, how?

As a front-end developer being exposed to the concept of
usercontrols, I thought (asked the question), with .net
it must be possible to have template files that contain
similar front-end static or dynamic code from which code
be called, much in the same way a javascript functions
can be called from a js library.

FOR INSTANCE
I work on a site with multiple sections. Each section has
an asp header file with a tab on state fro navigation.
With .net, I want to replace my multiple header asp files
with a 'Headers' usercontrol library file from which i
can call any header.

E.G.
----------------HEADER_USERCONTROL.ASPX FILE--------------
-------------
<%@ COMMON CODEBEHIND FOR HEADERS %>

<% HEADER_X START TAGNAME="HEADX" %>
header_x html code, (could be static or dynamic)
<% HEADER_X END %>
<% HEADER_Y START TAGNAME="HEADY" %>
header_y html code, (could be static or dynamic)
<% HEADER_Y END %>
<% HEADER_Z START TAGNAME="HEADZ" %>
header_z html code, (could be static or dynamic)
<% HEADER_Z END %>
----------------HEADER_USERCONTROL.ASPX FILE--------------
-------------
----------------PARENT PAGE.ASPX FILE---------------------
------
<%@ SITE DEFAULT CODEBEHIND %>
<%@ Register TagPrefix="UserControl_LIB"
Src="HEADER_USERCONTROL.ASPX" %>
<html>
<body>
<UserControl_LIB:HEADZ runat="server" />
</body>
</html>

----------------PARENT PAGE.ASPX FILE---------------------
------

If you understood that lot, great. That's pretty much
what I hope is possible within .net.

Can anyone help??

Cheers, kevin
Jul 21 '05 #1
0 980

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

Similar topics

4
by: Mark Friedman | last post by:
I can't seem to figure out how to get a reference to a UserControl in the code-behind for the page that contains the control. All the examples I've seen show how to pass property values from the...
2
by: Sascha | last post by:
Hi there, I searched carefully through the web before finally deciding to post this message, because I could not find a solution for my problem. Hopefully someone will have a hint or explanation...
41
by: JohnR | last post by:
In it's simplest form, assume that I have created a usercontrol, WSToolBarButton that contains a button. I would like to eventually create copies of WSToolBarButton dynamically at run time based...
0
by: kevin | last post by:
I want to create basic usercontrol code libraries. Is the following possible? If so, how? As a front-end developer being exposed to the concept of usercontrols, I thought (asked the question),...
12
by: Joe | last post by:
Hello All: Do I have to use the LoadControl method of the Page to load a UserControl? I have a class which contains three methods (one public and two private). The class acts as a control...
9
by: Marcelo Cabrera | last post by:
Hi, I have a user control that in turn creates a bunch of webcontrols dynamically and handles the events these webcontrols raise. It used to work fine on ASP .Net 1.1 but when compiled on 2.0 it...
2
by: lotus | last post by:
HI All.. I'm realtively new to C#. I have MainForm which includes Parent usercontol, and this parent usercontrol also contains child usercontrol. MainForm --> Parent usercontrol --> child...
0
by: oliver | last post by:
QUESTION: How to access an object embedded in a UserControl through Javascript file? Another way to ask this question: How to execute script from a UserControl, accessing other objects in that...
6
by: MeowCow | last post by:
I have created a UserControl that encapsulates a third party data grid. My goal was to create my own DataSource and DataMember properties that forward the binding to the third party grid, then use...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.