使用某些浏览器版本的FileUploader控件问题 [英] Problem with FileUploader Control with some browsers versions

查看:91
本文介绍了使用某些浏览器版本的FileUploader控件问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚使用文件上传器控件在我的应用程序中上传文件..这是我所知道的简单工作....但它不适用于某些浏览器版本..





这是非常严肃的外观..因为它提供错误文件不是.pdf格式..因为我已经检查了文件只有PDF在c#代码结束..





Plz帮助我...我想知道浏览器是否存在问题,因为任何插件或操作中的其他东西系统导致此问题....

I have just used file uploader control to upload file in my application.. it is simple work as i know....but it not working with some browser versions..


It is very serious looks..because it gives error file is not in .pdf format.. because i have checked files only PDF at c# code end..


Plz help me out...i would like to know whether it is problem at browser due to any add-ons or some thing else in operating system is causing this problem....

推荐答案

在代码文件中,您可以使用以下条件:



In code file you can use condition as following:

if (FileUpload1.PostedFile.ContentType.ToLower() == "application/pdf")
{
  //Your code
}
else
{
  //Display message that pdf file not selected.
}


这篇关于使用某些浏览器版本的FileUploader控件问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆