how to read an image file in asp.net c# using asp:fileupload?
<p>I used the code below for upload an image. Please let me know that why this code does not work at all. I am also using updatePanal and multiview control for tab controlling.</p>

<pre><code>&lt;asp:FileUpload ID="fuPhoto" runat="server"/&gt;
&lt;div style="margin-top:20px;text-align:center;"&gt;
    &lt;asp:Button ID="btnAddMemberInfo" runat="server" Text="Add" Width="100px" onclick="btnAddMemberInfo_Click" /&gt;                                
&lt;/div&gt;

public byte[] GetPhtoStream()
            {
                byte[] bufferPhoto = new byte[fuPhoto.PostedFile.ContentLength];
                Stream photoStream = fuPhoto.PostedFile.InputStream;
                photoStream.Read(bufferPhoto, 0, fuPhoto.PostedFile.ContentLength);
                return bufferPhoto;
            }
protected void btnAddMemberInfo_Click(object sender, EventArgs e)
        {
  Photo = GetPhtoStream(); //Photo represent for the database field which datatype is image
}
</code></pre>
