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

Best practises for using CSS with composite server controls.

Hi,

I am creating some ASP.NET composite server controls (inheriting from
CompositeControl). Right now I have the styles for the various objects
hardcoded, but what I would like to do is allow the user to use a stylesheet
without actually knowing the internal structure of the control. I am
insterested in knowing some of the best pracises for using stylesheets with
composite controls.

For example, when a person sets a border style on the main object, I would
like it not to affect the main container but rather the chile controls such
as textboxes and so on.
Jun 8 '07 #1
1 1608
Peter,

I think that to apply a CSS style to a child control, you would need to
write logic to do this.

Hope this helps,
Steve

"Peter Rilling" <pe***@nospam.rilling.netwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Hi,

I am creating some ASP.NET composite server controls (inheriting from
CompositeControl). Right now I have the styles for the various objects
hardcoded, but what I would like to do is allow the user to use a
stylesheet without actually knowing the internal structure of the control.
I am insterested in knowing some of the best pracises for using
stylesheets with composite controls.

For example, when a person sets a border style on the main object, I would
like it not to affect the main container but rather the chile controls
such as textboxes and so on.


Jun 9 '07 #2

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

Similar topics

0
by: jb_in_marietta | last post by:
All, I have written a very simple custom composite control that includes a control of type System.Web.UI.WebControls.Table. The control renders fine in run time, but for some reason, it does...
0
by: luca | last post by:
Hi all. My problem is that I can't handle events raised from child components within a composite server control when the control is created dynamically. Everything works fine if the same control...
10
by: dx | last post by:
I have the Microsoft Press: Developing Microsoft ASP.NET Server Controls and Components book. It's starting to shine some light on control development but there is something about composite...
3
by: M K | last post by:
I have a collection of controls I am using on several pages. I have: 1 Image 2 Labels I want to combine these so that I will also have certain properties available programatically. I want to...
5
by: Alex Nitulescu | last post by:
Hi. Because I'm a beginner in creating controls, I spent more than two *&^#$ hours to create this "login" as a custom control and to make it work properly: ...
0
by: Ken Baltrinic | last post by:
I am authoring a composite server control (inheriting from System.Web.UI.Control) that uses a good chunk of client side javascript. To make this work I need to call RegisterArrayDeclaration and in...
1
by: Mark Olbert | last post by:
I have a "master" composite control which, in turn, holds an instance of a "detail" composite control (the "master" control will ultimately contain multiple instances of the "detail" control, but...
4
by: Mark Olbert | last post by:
This involves a family of related, databound ASPNET2 composite controls. I've managed to arrange things so that the composite controls restore themselves from ViewState on postback after they're...
3
by: Eric | last post by:
I have created a fairly basic composite control consisting of a Label and a TextBox. In the overridden Render function, I'm creating a table with two rows and each row contains a cell (td). The...
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:
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:
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
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,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.