ASP.NET 2.0 FileUpload control tutorial
In this tutorial I will show how to write C# code that handles the FileUpload control. We will use the RegularExpressionValidator control for client-side validation and introduce server-side validation methods when uploading specific file types.
coming soon…
I need to validate the filename while browsing and uploading a file such tat,it should allow only .xls files
Hi Smitha, you can use the RegularExpressionValidator control to check the uploaded file for the pattern “*.xls” and also check the ContentType property as “application/excel” in case someone just changes the file name extension and attempts to upload the file.
Is it possible to change it to where it only shows a specific file type when browsing? I am thinking I am going to have to make this my first ever custom control because I only want to see the .pdf files in the folders when I browse.
You are an asshole! Why you post an article you have’t write yet? Are you stupid or what??
Hey Nahuel, sorry about not finishing the post. I’ve been trying to find a way to consolidate all my blogs/projects so I can maintain them more efficiently so I don’t piss off readers like you.