UPLOADING IMAGE without using <input type="file" > Control

Last post 03-02-2006 4:11 AM by tarjei. 6 replies.

Sort Posts:

  • UPLOADING IMAGE without using <input type="file" > Control

    03-01-2006, 6:43 AM
    • Member
      542 point Member
    • Kunal Mehta
    • Member since 12-17-2005, 12:15 PM
    • India
    • Posts 124
    Hello EveryOne,

    I am working on UPLOADING IMAGE. My Freind refering code from http://www.4guysfromrolla.com/webtech/091201-1.shtml . But there i have seen and lots of search on Google that <input type="file" id="ID" runat="server" /> this Input Type File Control is using to retrieve the path of particular File. this control looks like
    The image “http://www.4guysfromrolla.com/webtech/images/aspnetupload.s1.jpg” cannot be displayed, because it contains errors.
    But my Problem is that I don't want there Browse... button I want  "Attach Picture" Link Button with TextBox on Click on "Attach Picture" Link Button popup open as like in Clicking with Browse... Button

    Is this Possible or NOt .... please Tell me How to do it
    Kunal Mehta

    Web professionals who refuse to update their skills and insist on using outdated methods can no longer be called web professionals.

  • Re: UPLOADING IMAGE without using <input type="file" > Control

    03-01-2006, 7:54 AM
    • All-Star
      122,399 point All-Star
    • XIII
    • Member since 07-01-2002, 3:59 AM
    • Essen, Belgium
    • Posts 13,571
    • ASPInsiders
      Moderator
      TrustedFriends-MVPs

    Hi,

    the browser renders the <input type="file"> like that so you can't change it.

    Grz, Kris.

  • Re: UPLOADING IMAGE without using <input type="file" > Control

    03-01-2006, 9:12 AM
    • Contributor
      4,945 point Contributor
    • tarjei
    • Member since 04-27-2005, 5:33 AM
    • Oslo, Norway
    • Posts 988
    Hi,

    It's possible, but not trivial to style the <input type="file" /> element.
    Check out the article Styling an input type="file".


    --
    Tarjei
  • Re: UPLOADING IMAGE without using <input type="file" > Control

    03-02-2006, 12:24 AM
    • Member
      542 point Member
    • Kunal Mehta
    • Member since 12-17-2005, 12:15 PM
    • India
    • Posts 124
    I am not satisfied your Answeres So... Can you please tell more about it....
    Kunal Mehta

    Web professionals who refuse to update their skills and insist on using outdated methods can no longer be called web professionals.

  • Re: UPLOADING IMAGE without using <input type="file" > Control

    03-02-2006, 3:42 AM
    • Contributor
      4,945 point Contributor
    • tarjei
    • Member since 04-27-2005, 5:33 AM
    • Oslo, Norway
    • Posts 988
    Kunal Mehta wrote:
    I am not satisfied your Answeres So... Can you please tell more about it....

    Dunno if it'll satisfy you more, but to sum up; you cannot use a normal textbox and a link button to upload a file to the server. You need to use an <input type="file" /> element. And, like Kris pointed out, the text on the browse button is rendered by the the browser, and because of that it will look slightly different in different browsers on different operating systems. You can, however, style it to some extent using the method provided in the link in my previous post. For instance change the text on the browse button.

    --
    Tarjei
  • Re: UPLOADING IMAGE without using <input type="file" > Control

    03-02-2006, 3:55 AM
    • All-Star
      122,399 point All-Star
    • XIII
    • Member since 07-01-2002, 3:59 AM
    • Essen, Belgium
    • Posts 13,571
    • ASPInsiders
      Moderator
      TrustedFriends-MVPs

    tarjei wrote:
    It's possible, but not trivial to style the <input type="file" /> element.
    Check out the article Styling an input type="file".

    Hi,

    I knew one could do something about it with CSS but didn't had the time myself to really do some research on it. Seems like a great article and I will surely read it when I have some more time.

    On the other hand, I like to have the button rendered by the browser. Why? Endusers are used to it and because I also like to care about usability I like to leave it just there. If one's tampering with it endusers will probably get confused and draw away their attention to what matters: letting the endusers perform the actions that are really required for your application.

    Grz, Kris.

  • Re: UPLOADING IMAGE without using <input type="file" > Control

    03-02-2006, 4:11 AM
    • Contributor
      4,945 point Contributor
    • tarjei
    • Member since 04-27-2005, 5:33 AM
    • Oslo, Norway
    • Posts 988
    XIII wrote:
    On the other hand, I like to have the button rendered by the browser. Why? Endusers are used to it and because I also like to care about usability I like to leave it just there. If one's tampering with it endusers will probably get confused and draw away their attention to what matters: letting the endusers perform the actions that are really required for your application.

    I could not agree more. The point about usability is really important. Also, the method used to style the input field is kind of a hack, so there is no guarantee that it'll work in future browser versions.


    --
    Tarjei
Page 1 of 1 (7 items)