FileUpload Control

  • Thread starter Thread starter bsm
  • Start date Start date
B

bsm

Hi,

I want to Set asp:fileupload Filename at runtime. When I try to do, it
shows "Readonly" error. Anyway to achieve this.
 
I want to Set asp:fileupload Filename at runtime. When I try to do, it
shows "Readonly" error. Anyway to achieve this.

Absolutely not, for fairly obvious security reasons!

Imagine a public website with a hidden FileUpload control which uploaded
people's accounts database, or their Windows password file...
 
It is a read-only property and is automatically set by the ASP.NET runtime
when the user posts back the page with uploaded file from the browser.
 
Absolutely not, for fairly obvious security reasons!

Imagine a public website with a hidden FileUpload control which uploaded
people's accounts database, or their Windows password file...

--http://www.markrae.net

Actually My requirement was-
I have a File Upload control and one DropDownControl. I set
AutoPostBack is true to my DDL. After choosing Filecontrol, if i
change DDL value. The filename has got reset. which our users don't
like this. Do u have any alternate?
 
A FileUpload will not retain its' value between postbacks for security
reasons. Therefore, as long as the ListBox doesn't post back, you won't have
a problem.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 
A FileUpload will not retain its' value between postbacks for security
reasons. Therefore, as long as the ListBox doesn't post back, you won't have
a problem.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:http://www.miradyne.net







- Show quoted text -

Thanks for the information.
 
Back
Top