[英]How to preview image before upload on ASP.NET master page content placeholder
How do i preview image before upload on asp.net masterpage content placeholder using asp.net controls? 在使用asp.net控件上传到asp.net母版页内容占位符之前,如何预览图像? I would prefer it to be automatically displayed after choosing a image from the file upload control. 我希望从文件上传控件中选择一个图像后将其自动显示。
Here's my code: 这是我的代码:
UploadPicture.aspx UploadPicture.aspx
<asp:Content ID="Content1" ContentPlaceHolderID="content" runat="server">
<div class="container">
<div class="row">
<div class="col-sm-3">
<asp:FileUpload ID="FileUpload1" runat="server"/>
<asp:Image ID="image" runat="server"/>
<asp:TextBox ID="textBox1" runat="server"></asp:TextBox>
<asp:Button ID="upload" runat="server" OnClick="upload_Click" Text="Upload" />
<asp:Label ID="lb_msg" runat="server"></asp:Label>
</div>
</div>
</div>
Thanks! 谢谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.