Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > CSS and server controls

Reply
Thread Tools

CSS and server controls

 
 
calvinX
Guest
Posts: n/a
 
      11-10-2003
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-sizex-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


 
Reply With Quote
 
 
 
 
calvinX
Guest
Posts: n/a
 
      11-10-2003
forget it...

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



"calvinX" <(E-Mail Removed)> wrote in message
news:%23$(E-Mail Removed)...
> 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-sizex-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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: CSS on controls overrides CSS on themes randy.buchholz ASP .Net 0 08-21-2008 11:04 AM
Controls.Count, Controls.IsSynchronized, and Controls.SyncRoot Nathan Sokalski ASP .Net 4 09-05-2007 03:27 AM
Best practises for using CSS with composite server controls. Peter Rilling ASP .Net 1 06-09-2007 06:08 AM
Difference in Web server Controls and HTML Server Controls =?Utf-8?B?c2lhag==?= ASP .Net 7 03-07-2005 07:15 PM
HTML Server Controls vs Web Server Controls brian ASP .Net Web Controls 1 01-24-2005 05:13 AM



Advertisments