Many times in web application we need to upload file and require its extension to check the type of file, for this first import below namespace.
using System.IO;
Now extact extension with following code
fileUploadid="UpFile";
string fileExtension=System.IO.Path.GetExtensionUpFile.PostedFile.FileName);
0 comments:
Post a Comment