i have samce probelem
This code works in Internet Explorer. Not in anyother Why?

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="FileUploader.aspx.cs" Inherits="FileUploader" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <script type="text/javascript">
        function setImage()
        {
        debugger;
            var filepath=document.getElementById('<%=FileUpload1.ClientID %>');
            var simage=document.getElementById('<%=Image1.ClientID %>');
             var seimage=document.getElementById('<%=Image2.ClientID %>');
             filepath.click();  
            simage.src=filepath.value;
            seimage.src=filepath.value;
           // simage.href=filepath.value+''+simage.nameProp;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Image ID="Image1" runat="server" Width="200" Height="200"/>
        <img width="200" id="Image2" height="200" runat="server" />
        
        
    </div>
    <asp:FileUpload ID="FileUpload1" runat="server" onchange="setImage()"  />
    </form>
</body>
</html>

Old thread... Please create a new post for this. This is different issue even though it looks similar. The original thread was talking purely on JavaScript...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.