Hello Forum,
please how do I clear an image in asp.net image control ?
I have an image control like this:
<asp:Image ID="Image3" runat="server" Width="260px" Height="400px" />
a javacript that displays image when uploaded:
<script type="text/javascript">
function ImagePreview(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$('#<%=Image3.ClientID%>').prop('src', e.target.result)
.width(260)
.height(400);
};
reader.readAsDataURL(input.files[0]);
}
}
</script>
I used
Image3.dispose ();
But it is not working