<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<%--Add an Image control to the page.--%>
<asp:Image ID="Image1" runat="server" />
<%--Raise the "complete" and "upload" client-side events and set the maximum number of files to upload to 1.--%>
<wijmo:C1Upload ID="C1Upload1" runat="server" OnClientComplete="complete"
OnClientUpload="upload" width="300px" MaximumFiles="1" />
<script type="text/javascript">
var ImageSrc = "";
// Before upload, the image is set to the file that is saved in the TargetFolder "UploadedFiles" once upload is complete.
function upload(e, args) {
ImageSrc = "UploadedFiles/" + args[0].files[0].name;
}
// Once upload is complete, the image file saved in the TargetFolder appears in the Image control.
function complete(e, args) {
$("#<%=Image1.ClientID %>").attr("src", ImageSrc);
}
</script>
</asp:Content>