Help us to translate this website and improve this translation!
English | Castellano

How to Use the FileUpload AJAX Control

Styles

The handling of styles is perhaps one of the less elegant aspects of the FileUploadAJAX control. Nevertheless a weakness that is easy to pardon ;)

We can assign a specific style globally to the "input files" specifically by means of two properties:
  • CssClass: CSS class defined in a global "input file". For example, we can assign the style of the text "Add".
  • Style: text of the style that will be assigned to each individual "input file". For example, we can assign the style of the text "Uploading", "[x]" or "[delete]".


Add


Code.aspx
<cc1:FileUploaderAJAX ID="FileUploaderAJAX1" runat="server" MaxFiles="5" />
Code.aspx.cs
FileUploaderAJAX1.CssClass = "fua";
FileUploaderAJAX1.Style = @"
   body{font-size: smaller; color: red;}
   a{font-weight:bold;}
";