xorpower
xorpower

Reputation: 19003

Assign file path to FileUpload Control

How can i assign file path to FileUpload Control in VS 2005?

Why i need that?: 'cause, when i edit a row in GridView, the fileupload control becomes blank (which i believe is correct but client doesn't!!!) and a validation is thrown saying "File to be upload is not selected".

Upvotes: 1

Views: 7327

Answers (1)

Pranay Rana
Pranay Rana

Reputation: 176956

This is not possible due to security restrictions. The only way to set that property on the FileUpload control is to have the user make a selection.

But other solution is make use of lable control to display file path rather than file upload control. and when use click to upload file hide lable and display file upload control.

Upvotes: 1

Related Questions