0

I have one image button, on clicking i want to select the file using windows explorer and on clicking OK i want the file to be saved to DB.

Is it possible to have both select the file and update in one single image button. The requirement is such i need to do in single click.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
  • http://stackoverflow.com/a/16210373/2630817 – Just code Nov 03 '14 at 05:59
  • I have edited your title. Please see, "[Should questions include “tags” in their titles?](http://meta.stackexchange.com/questions/19190/)", where the consensus is "no, they should not". – John Saunders Nov 03 '14 at 06:00
  • possible duplicate of [How can I upload a new file on click of image button](http://stackoverflow.com/questions/16210231/how-can-i-upload-a-new-file-on-click-of-image-button) – Y.Puzyrenko Nov 03 '14 at 06:17
  • Thanks but above listed will not work out for me, for me button should pop a browser dialog and save directly. – Raghavan Nov 03 '14 at 09:45

1 Answers1

0

http://blogs.msdn.com/b/smondal/archive/2010/09/08/current-thread-must-be-set-to-single-thread-apartment-sta-mode-before-ole-calls-can-be-made.aspx

Please check this link, may be it will help you.

Deepanshu
  • 41
  • 6
  • Im getting following error: Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it. This exception is only raised if a debugger is attached to the process. – Raghavan Nov 03 '14 at 09:43