开发者

FileUpload Control questions

开发者 https://www.devze.com 2023-03-18 17:19 出处:网络
I have 2 questions: Question 1: Is it possible to keep the selected value of a summited FileUpload Control after a form is submitted?

I have 2 questions:

Question 1:

Is it possible to keep the selected value of a summited FileUpload Control after a form is submitted?

Question 2:

For a CustomValidator associated with the FileUpload control is it 开发者_JAVA百科possible to check determine which button originated the validation?


Question 1:

Asp.net file upload control does not keep the posted file in the ViewState, due to security and reliabilty. Posted File will be available on the very first postback right after you selected the file. So you may save the file on next button click of the relevent step and keep the saved file location in a session or viewstate variable.

0

精彩评论

暂无评论...
验证码 换一张
取 消