Maintain file value during Grid validation

I have a Grid which contains a field with a file upload control in it. The problem is if you go to update the grid and a validation fails the file is lost.

Can someone please tell me how and where I could store the file during postbacks?

Currently it is in a static field but I think this may not be a good idea?

-------------Problems Reply------------

I don't think you can keep the filename in the box during a postback without actually uploading the file... I don't think you can preset the value of a file-upload box, this would be a major security issue. If this was possible you could programatically set the value of the box to "/etc/passwd" and hide the box, and use javascript to submit the form...

I think you need to consider client-side validation. If you have something you need to validate server-side, you could do it in an ajax-call.

Category:c# Views:0 Time:2010-12-05

Related post

Copyright (C), All Rights Reserved.

processed in 0.120 (s). 11 q(s)