Re: Issue with the file input control

Discussion in 'ASP .Net' started by Kevin Spencer, Aug 4, 2004.

  1. 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.

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

    "Sarma Josyula via .NET 247" <> wrote in message
    news:#...
    > (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 (http://www.dotnet247.com/)
    >
    > <Id>Gxc0V0WTsUqgEWuwn0L/yQ==</Id>
    Kevin Spencer, Aug 4, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. HVG
    Replies:
    2
    Views:
    2,456
  2. Brian Henry
    Replies:
    1
    Views:
    631
    Steven Cheng[MSFT]
    Jul 20, 2004
  3. Hasini
    Replies:
    2
    Views:
    328
    Hasini
    Feb 3, 2007
  4. Replies:
    3
    Views:
    379
  5. Tarkeshwar
    Replies:
    2
    Views:
    179
Loading...

Share This Page