I have FileUpload Control on my Page:
<asp:FileUpload runat="server" ID="fuAttachment" CssClass="fileUploadCSS" size="76" />
I want to change size of this Control on Button’s Click event though Jquery.
How do i set it? because ($("#fuAttachment").size doesn’t working. and ($("#fuAttachment").width returns null
Thanks in Advace
Try this for your button onclick method:
$('#fuAttachment').css('width',200);You can find more information about the jQuery css method here
Update
During my conversation with devjosh i came up with this line of code
$('#fuAttachment').attr('size', 50);It seems that the size attribute is much more supported in modern browsers than change the css width property.
You cann see a working example here: http://jsfiddle.net/CY3jG/1/ (Tested in IE 8 and FF 9)