validate the extension of the uploaded file
-
Excellent. I suggest you download Expresso, and use that to build your regex. I'm not sure exactly what sort of validation you want to do ( image file, file with an extension that is three letters, what ? ), so I can't really give you an answer.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
i once give an answer to someone with the same request. please search here on the forum
Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/
-
Excellent. I suggest you download Expresso, and use that to build your regex. I'm not sure exactly what sort of validation you want to do ( image file, file with an extension that is three letters, what ? ), so I can't really give you an answer.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
actually i want to just validate whether the uploaded file is a video file or not i-e .dat, .mp4,.mpegv etc
Of course, a file can be a video and not have a valid extension. You can use the System.IO.Path class to get the extension and do a basic string match, just call ToLower or ToUpper to make case irrelevant.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
if you use the asp:fileupload control use the