如何更改文件上传控件中浏览按钮的文本 (System.Web.UI.WebControls) [英] How to change the Text of the browse button in the FileUpload Control (System.Web.UI.WebControls)

查看:27
本文介绍了如何更改文件上传控件中浏览按钮的文本 (System.Web.UI.WebControls)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想更改 FileUpload Control (System.Web.UI.WebControls) 中浏览按钮的文本,而不是我想使用的 [Browse...] 文本 [...]

I want to change the Text of the browse button in the FileUpload Control (System.Web.UI.WebControls), instead of the [Browse...] text I want to use [...]

推荐答案

出于安全目的,这在技术上是不可能的,因此不会误导用户.

This isn't technically possible for security purposes, so the user cannot be misled.

然而,有几种解决方法,尽管这些方法需要使用原始 HTML 而不是 .NET 服务器控件 - 请查看 http://www.quirksmode.org/dom/inputfile.html 举个例子.

However, there are a couple of workarounds, although these require working with the raw HTML rather than the .NET server control - take a look at http://www.quirksmode.org/dom/inputfile.html for one example.

这篇关于如何更改文件上传控件中浏览按钮的文本 (System.Web.UI.WebControls)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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