Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net 如何在代码隐藏中获得上传文件的扩展名?_Asp.net - Fatal编程技术网

Asp.net 如何在代码隐藏中获得上传文件的扩展名?

Asp.net 如何在代码隐藏中获得上传文件的扩展名?,asp.net,Asp.net,我的asp.net页面中有此行: 我的问题是如何在代码隐藏中获得上传文件的扩展名 string ext = System.IO.Path.GetExtension(this.File1.PostedFile.FileName); File1是您的FileUpload控件。希望这对你有帮助

我的asp.net页面中有此行:

我的问题是如何在代码隐藏中获得上传文件的扩展名

string ext = System.IO.Path.GetExtension(this.File1.PostedFile.FileName);
File1是您的FileUpload控件。希望这对你有帮助