How to Implement a Browse Button in asp.net WebApplication

Discussion in 'ASP .Net' started by conckrish@gmail.com, Jun 1, 2006.

  1. Guest

    Hi all,

    This is all about ASP.NET WEB APPLICATION...

    I have a Button and when i click that button... i need to open the File
    Dialog through Which i have to select the Image Path...

    And When i press the OK Button of the File Dialog ..... i have to get
    the File name selected and set it as TextBox Text and also Show Image
    Preview...

    Is it possible to implement Browse button in ASP.NET WEB
    APPLICATION........

    I have used

    <input type:file> for selecting the Image Path but could not get the
    File Path and Show the PReview Display from it....

    Can any One Please help me How to solve this...

    Its Urgent.........
    PLZ REPLY

    Thanks in Advance...

    Sanjay.C
    , Jun 1, 2006
    #1
    1. Advertising

  2. Patrice Guest

    AFAIK you can't. Though you could perhaps tweak security I believe that
    starting with SP2, a web page can't access all local resources even if this
    could be considered safe (such as having a src attribute that points to a
    local file).

    What have you trieed that doesn't work ? (My first thought would be to set
    the src attribute of an img tag to the selected file but I believe it won't
    work if the file is local, an easy solution if small files would be to
    upload the file to the server so that the resource is not local any more).



    --
    Patrice

    <> a écrit dans le message de news:
    ...
    > Hi all,
    >
    > This is all about ASP.NET WEB APPLICATION...
    >
    > I have a Button and when i click that button... i need to open the File
    > Dialog through Which i have to select the Image Path...
    >
    > And When i press the OK Button of the File Dialog ..... i have to get
    > the File name selected and set it as TextBox Text and also Show Image
    > Preview...
    >
    > Is it possible to implement Browse button in ASP.NET WEB
    > APPLICATION........
    >
    > I have used
    >
    > <input type:file> for selecting the Image Path but could not get the
    > File Path and Show the PReview Display from it....
    >
    > Can any One Please help me How to solve this...
    >
    > Its Urgent.........
    > PLZ REPLY
    >
    > Thanks in Advance...
    >
    > Sanjay.C
    >
    Patrice, Jun 1, 2006
    #2
    1. Advertising

  3. Amrit Guest

    hi! this is amrit.
    sameproblem washappening with me as i also develop applicationsin
    asp.net using vb.net.
    what you can do for this is you can place a hidden field on for the
    html controls toolbox,
    and then you have to load that URL in that hidden field bvefore loading
    it to the image control.

    then lateron, you can access that url.
    But the problem that i was facing was that i have to load 5 pics at a
    time and using 10 hidden fields in form is not a good practice.


    take care
    have a nice stay..

    Amrit, Jun 16, 2006
    #3
    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. =?Utf-8?B?ZmFy?=

    creating webapplication in visual basic.net

    =?Utf-8?B?ZmFy?=, Apr 4, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    304
  2. remi

    Single SignOn through ASP.NET WebApplication

    remi, Jan 9, 2007, in forum: ASP .Net Security
    Replies:
    0
    Views:
    109
  3. T. Beneke

    Routing Userrights to another ASP.Net Webapplication

    T. Beneke, Aug 25, 2008, in forum: ASP .Net Security
    Replies:
    1
    Views:
    721
    Joe Kaplan
    Aug 25, 2008
  4. harbi
    Replies:
    2
    Views:
    182
    Chris Muench
    Nov 7, 2003
  5. Replies:
    0
    Views:
    204
Loading...

Share This Page