Hi Robin,
I have seen a solution that uses an input type=file HTML element that is
hidden with a style. Over that is placed a text box and a button. When you
click the button, it clicks the hidden button in the hidden element (using
JavaScript), which pops up the file open dialog box. Once you select the
file, the value attribute of the file upload element is copied to the
textbox, again, using JavaScript. By using this technique you have
ViewState, and a more malleable user interface.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
"Robin" <ro*******@hotmail.com> wrote in message
news:eM**************@TK2MSFTNGP09.phx.gbl...
Is there another asp.net control that can be used to select a file that
has
the viewstate option?
"Patrice" <no****@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl... What is the exact problem ?
By design you'll never be able to persist values in this control for
safety reasons (i.e. the only way to fill this control is to have the user
select
a file).
Patrice
--
"Robin" <ro*******@hotmail.com> a écrit dans le message de
news:eI**************@TK2MSFTNGP09.phx.gbl... > On an ASP.Net page that has viewstate enabled.
> How do you enable viewstate for a server side file input control?
> Currently I have in the HTML view.
> <INPUT id="myID" type="file" name="myID" runat="server">
>
>