Wrox Programmer Forums
|
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 22nd, 2007, 05:24 AM
Authorized User
 
Join Date: Aug 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to thillaiarasu
Default uplaod image in asp.net

i want to show the image while it is uploaded

n.thillaiarasu
__________________
N.ThillaiArasu
 
Old June 22nd, 2007, 06:48 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

Please be more specific with your issue....

Regards
Mike

Don't expect too much, too soon.
 
Old June 22nd, 2007, 10:36 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I tried this:
Code:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Untitled Page</title>
    <script language="javascript">
        function setImage(upload){
            var imgPreview = document.getElementById("imgPreview");
            imgPreview.src = upload.value;
        }
    </script>
</head>
<body>
    <input id="File1" type="file" onchange="setImage(this);" /><br />
    <br />
    <img src="" id="imgPreview" alt="Image Preview" height="200" />
</body>
</html>
This works in I.E. but I couldn't get it to work in Firefox or Opera. I think it has to do with the way that non-i.e. browsers deal with local file urls. Short of this, you can't show the user the picture until it's uploaded and you feed it back to them from the server.

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.net image resizing itHighway ASP.NET 2.0 Basics 2 April 5th, 2008 04:48 PM
Convert an image into tumbnail (ASP.NET C#) richie86 ASP.NET 1.0 and 1.1 Basics 3 March 8th, 2007 12:37 PM
How to get Image from sql Server in Asp.net akumarp2p C# 2005 1 February 22nd, 2007 09:51 AM
image directory asp.net sand133 ASP.NET 2.0 Basics 1 August 21st, 2006 01:10 PM
embedded image in asp.net mu_ping ADO.NET 1 January 22nd, 2004 10:06 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.