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

CSS and server controls

Hi Everyone,

My question involves my <ASP:Textbox> and <ASP:label> controls.

I have created a class in my styles.css file and linked it to my document.
I have set the CSSClass property for one of my servercontrols (textbox) to
the class name but It does not change the appearance of the control at
runtime or design time. I am assuming that the style will not ripple down
at design time in the editor but it should still work in the browser at run
timne should it not. here is my style:

..MainListTextbox
{
border-color:Gray;
border-width:1px;
border-style:solid;
font-family: Tahoma, sans-serif;
font-size:xx-small;
font-style:normal;
text-decoration:none;
word-spacing:normal;
letter-spacing:normal;
color:mediumblue;
width:500px;
height:150px;
}

And here is the control that is trying to use it:

<asp:TextBox id=txtDesc runat="server" Height="100px" Width="100px"
CssClass=".MainListTextBox" TextMode="MultiLine" ReadOnly="True" text='<%#
DataBinder.Eval(Container.dataitem, "Desc") %>'></asp:TextBox>

any help or pointers to resources using CSS Styles for ASP.NET controls in
would be great. I would like to store the styles in my .css file, which I
am doing now.

Thanks a bunch,

CalvinX
Nov 17 '05 #1
1 1172
forget it...

I was using a period in the class name ".MainListTextBox" >>
"MainListTextBox

"calvinX" <ro***************************@hotgrail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi Everyone,

My question involves my <ASP:Textbox> and <ASP:label> controls.

I have created a class in my styles.css file and linked it to my document.
I have set the CSSClass property for one of my servercontrols (textbox) to
the class name but It does not change the appearance of the control at
runtime or design time. I am assuming that the style will not ripple down
at design time in the editor but it should still work in the browser at run timne should it not. here is my style:

.MainListTextbox
{
border-color:Gray;
border-width:1px;
border-style:solid;
font-family: Tahoma, sans-serif;
font-size:xx-small;
font-style:normal;
text-decoration:none;
word-spacing:normal;
letter-spacing:normal;
color:mediumblue;
width:500px;
height:150px;
}

And here is the control that is trying to use it:

<asp:TextBox id=txtDesc runat="server" Height="100px" Width="100px"
CssClass=".MainListTextBox" TextMode="MultiLine" ReadOnly="True" text='<%#
DataBinder.Eval(Container.dataitem, "Desc") %>'></asp:TextBox>

any help or pointers to resources using CSS Styles for ASP.NET controls in
would be great. I would like to store the styles in my .css file, which I
am doing now.

Thanks a bunch,

CalvinX

Nov 17 '05 #2

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

Similar topics

2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
1
by: Matthew Louden | last post by:
Personally, I am totally confused with the following control terms and usage and advantages of each one in ASP.NET web application. Here's what I know so far.. 1. HTML Client Control: understood...
4
by: Steve Bywaters | last post by:
(In my transition from ASP to ASP.NET) *When* would I use at "runat server" tag on a button, as opposed to a normal button? If I set up a search area on a page, with a 'Search' button that...
5
by: Mong | last post by:
Hi, I have a webform with various asp controls on it such as textboxes and dropdownlists. I'm fairly new to asp.net coming from VB6 and am wondering when it's best to use client side events and...
2
by: Brian | last post by:
NOTE ALSO POSTED IN microsoft.public.dotnet.framework.aspnet.buildingcontrols I have solved most of my Server Control Collection property issues. I wrote an HTML page that describes all of the...
5
by: siaj | last post by:
Hello All, Can any one give me a clue when to use Web Server controls/ HTML server controls/HTML Controls. As I understand .. HTML controls should be used if u dont need to refer it in the code...
20
by: Guadala Harry | last post by:
In an ASCX, I have a Literal control into which I inject a at runtime. litInjectedContent.Text = dataClass.GetHTMLSnippetFromDB(someID); This works great as long as the contains just...
5
by: serge calderara | last post by:
Dear all, I am new in asp.net and prepare myself for exam I still have dificulties to understand the difference between server control and HTML control. Okey things whcih are clear are the fact...
22
by: Mr Newbie | last post by:
I was thinking about developing a workflow application yesterday and was musing over the different approaches than one could take in restricting specific actions on a ticket( Form ) at any said...
2
by: Mike | last post by:
Hi, I am strugling with a simple problem which I can't seem to resolve. I have an asp.net page which contains a server-control (flytreeview, which is a kind of a tree to be exact). The tree is...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.