CssClass and HTML file field control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

All,

I have a ASP.NET/C# webform which contains a Webform button that has a
CssClass applied to give it a special effect. Now the same webform has a
filefield control but the browse button is the default. I would like to
apply the same CssClass style to the browse button is this possible and how?

Thanks
Msuk
 
It sounds like you are using a file field. You use the class attribute with
the name of the CssClass style.

Not sure if all styles will apply to it:

<input class="btnclass" type="file">
 
Hi,

The style was applied to the text portion of the file field control but not
the button part. I just want to apply the style to the 'browse' button and
leave the text portion as the default white.

Thanks
Msuk
 
Hi,

Thanks for your response, the file field control is a HTML control not a
webcontrol and has no CssClass property. So is it still possible to apply a
CSS to the button on the file field control?

Thanks
Msuk
 
Try adding (ur style directly)
<input class="btnclass" type="file" style="YourStyles">
Hope it helps!
Patrick
 

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

Back
Top