473,473 Members | 2,309 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Style asp.net controls with CSS

Is it possible to stype the asp.net controls (asp:Login, asp:GridView,
asp:FormView; asp:DropDownList, etc...) with a standard css file?

Any suggestions?

Thanks...
Sep 21 '08 #1
1 1050
I don't see why not. How are you defining the style rule in the css file
(what type of selector are you using)? If you are using a class selector for
the style rule, then all you should need to do is set the CssClass property.
However, because some controls do not simply generate one tag (such as
GridView, FormView, Login, and several others), you may want to look at what
tags are generated to determine where to put the CssClass property, you may
often need to put it in a control that is in the template used by the
control, or sometimes certain controls have an extra property for the style
of a certain part. But two of the key things that you can do are look at
what is generated so you know what html tags you are dealing with, and you
can also use the css child selectors in your css file to help when you only
have the opportunity to assign a value to one CssClass property. Just fool
around with these options and you can usually find a way to do it if it can
be done with css. Good Luck!
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Bobby Edward" <bo***@nobody.comwrote in message
news:eE**************@TK2MSFTNGP05.phx.gbl...
Is it possible to stype the asp.net controls (asp:Login, asp:GridView,
asp:FormView; asp:DropDownList, etc...) with a standard css file?

Any suggestions?

Thanks...

Sep 21 '08 #2

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

Similar topics

4
by: Paul Aspinall | last post by:
I am designing a Winforms app, using the NetAdvantage (Infragistics) controls - which are very good. How can I make multiple different contents in my content pane?? ie. In Outlook, there is a...
1
by: Kevin | last post by:
My app was built with VC++ and run on WinXP, I found the controls style of my app is different from controls in those apps coming with WinXP, like button, check box, listctrl, etc, those controls...
2
by: Herb Stull | last post by:
I'm trying to give users a choice of the visual interface used in my ASP.NET application using Cascading Style Sheets. Ideally I'd like to offer them several choices for backgrounds, fonts, etc....
5
by: JezB | last post by:
Is it possible to programatically examine and modify a page's Styles (including Cascading Style Sheets) within the code-behind-module (eg. c#) ? My guess is that since these are HTML elements the...
7
by: Don Wash | last post by:
Hi There! I'm creating several ASCX Controls and those controls will have their own CSS Style Sheets. But I don't know how I can link the corresponding Style Sheet in the ASCX file? Because the...
7
by: Rob Nicholson | last post by:
We're using a well known presentation layer library to implement complex controls on an intranet site. IE has the following limitation which effectively means that you can only have 30 <STYLE> tags...
9
by: Max Weebler | last post by:
Hi, I have a datagrid built that has an alternating item style that sets the backcolor and ForeColor of its rows. I have 4 template columns. One of them has a LinkButton embedded in it to...
6
by: rongchaua | last post by:
Hi all, I want to change the style of a button. But I don't know how to do it. For example, I have already a button OK on form. I want to add these styles to this button (WS_CHILD || WS_VISIBLE ||...
3
by: Dave Hughes | last post by:
Hi, I've run across a problem styling form controls (quel surprise), or rather in this case, "unstyling" them. I'm trying to put together a theme for a web application which has a fairly...
4
Frinavale
by: Frinavale | last post by:
So a while ago I created a Tab Strip Control (before the AjaxToolkit had theirs otherwise I would have probably just used theirs). When I looked at the AjaxToolkit control to see how they got...
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...
1
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...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.