浏览时的文件上传过滤器单击 [英] File Upload Filter on Browse Click

查看:84
本文介绍了浏览时的文件上传过滤器单击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的要求是仅允许.xlsx | xls文件,没有其他内容.为此,当用户单击文件上传控件的浏览按钮时,我想过滤此mime类型而不是客户端脚本或字段验证器吗?在浏览文件对话框中,仅需显示.xlsx | .xls文件.可以使用Windows窗体中的打开文件对话框来完成,如何在Web应用程序中使用文件上载控件来实现相同的目的?创建自定义控件?或任何可用的现成控件都可以使用..?ajax或其他任何控件中是否有类似这样的控件?

My Requirement is to allow only .xlsx|xls files, nothing else. For this Instead of client script or field validators I would like to filter this mime type when user clicks on browse button of file upload control? In the browse file dialog only .xlsx|.xls files have to be displayed.It can be done using open file dialog in windows forms , How can I achieve the same using file upload control in my web application???Do I need to create a custom control?or any readymade control is available for use..?Is there any control like this in ajax or any other ....

any suggestion is appreciated.

推荐答案

http://forums.asp.net/t/1452643.aspx/1 [ ^ ]
http://csharpdotnetfreak.blogspot.com/2011/12/upload-and-read-excel-file-in-aspnet.html[^]

http://forums.asp.net/t/1452643.aspx/1[^]


这篇关于浏览时的文件上传过滤器单击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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