Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. preview before upload image

preview before upload image

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    apadana_1989
    wrote on last edited by
    #1

    how i do for preview before upload image in asp.net on the cliend side please help me

    M 1 Reply Last reply
    0
    • A apadana_1989

      how i do for preview before upload image in asp.net on the cliend side please help me

      M Offline
      M Offline
      Michael Jiangdahua
      wrote on last edited by
      #2
              fuUpload.change(function() {
                  if ($.browser.msie) {
                      imgUser.attr("src", "file:///" + fuUpload.val());
                  } else if ($.browser.mozilla) {
                      imgUser.attr("src", document.getElementById('<%=fuUpload.ClientID%>').files\[0\].getAsDataURL());
                  }
              });
      
      L 1 Reply Last reply
      0
      • M Michael Jiangdahua
                fuUpload.change(function() {
                    if ($.browser.msie) {
                        imgUser.attr("src", "file:///" + fuUpload.val());
                    } else if ($.browser.mozilla) {
                        imgUser.attr("src", document.getElementById('<%=fuUpload.ClientID%>').files\[0\].getAsDataURL());
                    }
                });
        
        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Nice answer, but you forgot to mention that you must include jQuery script.

        "Don't confuse experts with facts" - Eric_V

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups