保留FileUpload控件值 [英] Retain value in fileupload control
问题描述
我写一个文件上传应用程序。因此,它包含文本和一个FileUpload键名
控制。保存按钮是用来保存键名和文件。我的问题是,当我选择FileUpload控件一个文件,我DONOT输入键名文本框中的任何值,然后点击保存按钮,将显示一条消息输入键名,但FileUpload控件被清除。如何能留住在FileUpload控件值?
I am writing a file upload application. So it contains a keyname in textbox and a fileupload control. A save button is used to save the keyname and the file. My issue is when I select a file in fileupload control and I donot enter any value in keyname textbox and click on save button, a message is shown 'enter a keyname' but the fileupload control is cleared. How can retain the value in the fileupload control?
推荐答案
您不能保留FileUpload控件值。这是因为安全原因。你可以使用的RequiredFieldValidator的键名的文本框。
You can't retain value in FileUpload control. This is because of security reasons. you can use RequiredFieldValidator for keyname textbox.
这篇关于保留FileUpload控件值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!