Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: Issue with the file input control

Thread Tools

Re: Issue with the file input control

Kevin Spencer
Posts: n/a
An input type=file HTML element cannot have its value property set
programmatically for security purposes. I doubt you're going to like this,
but you can't do anything about it. You would have to create a custom
ActiveX Control or Java applet to have other behavior.

Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Sarma Josyula via .NET 247" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> (Type your message here)
> Hi,
> I have a GUI issue with the file input control. It does not keep the

selected filename after postback if server side validation fails.
> Since we have to execute some business methods, we have to have server

side validation only.
> Now if the validation fails on the server side I lose the selected file

name and it comes back empty.
> I would like to show the selected file in the control in such cases (where

the validation fails and requires another submit)
> I tried to set the value in the text box using javascript but found that

it cannot be done.
> I guess many of you must have worked around this problem so I was hoping

you could guide me towards the solution.
> Any help is welcome.
> Regards
> Sarma
> --------------------------------
> From: Sarma Josyula
> -----------------------
> Posted by a user from .NET 247 (
> <Id>Gxc0V0WTsUqgEWuwn0L/yQ==</Id>

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reg:Issue on Input File browser control Hasini ASP .Net 2 02-03-2007 07:38 AM
how to restrict user from input in <input type="file"> Tarkeshwar Javascript 2 04-17-2006 11:44 AM
Getting User Input after getting Input from a file C++ 3 03-23-2006 05:01 AM
File upload errors when exe on Input type = file control Brian Henry ASP .Net 1 07-20-2004 09:52 AM
File Upload Issue - INPUT type="file" and Use of .click() HVG ASP .Net 2 06-13-2004 07:49 AM