FileUpload width property not working


This issue normally comes in Firefox. In IE, setting the css width will take care of the width of the file upload control. In Firefox, you need to use the size property to set the width of the fileupload, as Firefox rendering engine does not set the width on the width property of the control. The solution would look like:

<asp:FileUpload ID=”fuCtgMem” runat=”server” CssClass=”file” size=”31″ /> 

Size is not a pixel value. Hence you have keep checking the proper value for this, in FF. This is the case with the html fileupload control also. Just set the size property and voila! It works in FF.

jQuery not working from external js file?


I had faced this issue in one of my development projects. I used jquery lavishly in every bit of my javascript code. Since during development, i used to write the scripts in the page itself, i didn’t have to bother much. But later when i decided to move the scripts to another external “.js” file, i found all my jquery methods failing. The common error being : $ not defined. After a lot of trial and errors, i was able to get to the bottom of the issue.

The solution:

You can have only one $.document(ready(){}); in the whole application. Remove all the DOM readiness checkers and add a single one in the main js file that you will be loading always.