Applying CSS to HTML Control Programatically

P

Prakash

I am using HTML controls in my page i want to Programatically apply CSS for
that controls as that of contorol.CSS="cssname" for Web Control. How to do
it?.

Thanks in Advance
Prakash.V
 
P

Prakash

Hi,
Only Web Control has Control.CssClass , but HTML Control doesn't have
that property.
Is there any method to set Css for HTML control Programatically ?

Prakash.V
 
K

Kevin Spencer

control.Attributes.Add("class", "yCssClass");

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Complex things are made up of
Lots of simple things.
 
M

Mr Newbie

I used to have a friend called Prakash.

I used to tease him that his name sounded like the Klingon name for a bowl
of live grubs!

I'm well known for my tact, dimplomacy, and the ease at which I seem to make
friends.

;-D
 
K

Kevin Spencer

I'm well known for my tact, dimplomacy, and the ease at which I seem to
make friends.

Yeah, me too. On the newsgroups I only show my "friendly" face.

:-O

--
;-)

Kevin Spencer
Microsoft MVP
..Net Developer
Complex things are made up of
Lots of simple things.
 
P

Prakash

Thanks Kevin Spencer,
control.Attributes.Add("class", "CssClassName");
Is working fine.

and also thanks Newbie for your comments,
and your name also sounds strange for me.I think u r a "Jolly Man".

mee too
;-))

Prakash.V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top