Utilize Read-Only TextBoxes in FileUpload Control of ASP.NET
Nowadays, I am spending most of my work time on developing a “document depot” type of web application which has a heavy usage of FileUpload control. And, it was one of the requirements that users should not be able to modify the associated textbox after browsing the document from their hard drives. I believe it is a very good user-experience practice and it avoids some possible security issues as well. After walking around between some search results, I have found the following solution by assuming that FileUpload1 is the ID of the control:

VB.NET:

C#:

As a result, users would be able to select a document only by using the Browse button.
I have tested the sample code with the latest versions of IE and Firefox, and everything seemed to be working fine with both browsers.
Mustafa - Do you know a way of changing the text on the FileUpload button? Thanks.
Mark,
As far as I know, there is no workaround to update the default caption of FileUpload button. It is a read-only property which I guess due to a matter of security. You can try your chance by asking it at the forum (http://forums.asp.net) though.
Hi Mark,
Check this: http://www.quirksmode.org/dom/inputfile.html