Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I think this is a good example:</p> <p><a href="http://www.codeproject.com/KB/ajax/AJAXUpload.aspx" rel="nofollow">http://www.codeproject.com/KB/ajax/AJAXUpload.aspx</a></p> <p>this is a good starting point too:</p> <p><a href="http://www.eggheadcafe.com/community/aspnet/2/10204276/how-to-display-image-when-upload-image.aspx" rel="nofollow">http://www.eggheadcafe.com/community/aspnet/2/10204276/how-to-display-image-when-upload-image.aspx</a></p> <p>or here:</p> <p><a href="http://www.eggheadcafe.com/community/aspnet/2/10236947/image-upload-and-display.aspx" rel="nofollow">http://www.eggheadcafe.com/community/aspnet/2/10236947/image-upload-and-display.aspx</a></p> <p><strong>updated</strong></p> <pre><code> protected void Button4_Click(object sender, EventArgs e) { string strExtn; string strpostedfile; strpostedfile = fileuploading.PostedFile.FileName; strExtn = System.IO.Path.GetExtension(strpostedfile); strExtn = strExtn.ToLower(); string strEx = Path.GetExtension(fileuploading.PostedFile.FileName).ToLower(); String filename = Path.GetFileName(fileuploading.FileName); filename = filename.Remove(filename.Length - strEx.Length); fileuploading.SaveAs(Server.MapPath("~/Photos/") + filename); uploadImage.ImageUrl = "~/Photos/" + filename; } </code></pre> <p>Page:</p> <pre><code> &lt;asp:FileUpload ID="fileuploading" runat="server" /&gt; &lt;asp:Button ID="Button4" runat="server" onclick="Button4_Click" Text="Button" /&gt; &lt;br /&gt; &lt;asp:Image ID="uploadImage" runat="server" /&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload