Hi,
I want to show the selected image as the preview, i have used below code but it is not working and tools.
i am using Visual Studio 2010 Premium,
<telerik:RadUpload ID="RadUpload1" runat="server" OnClientFileSelected="OnClientFileSelected" AllowedFileExtensions=".bmp,.jpeg,.jpg,.gif" MaxFileSize="100000000"/>
<asp:Image id = "imgTheme" runat="server" ClientIdMode = "Static"/>
<script type = "test/javascript">
function OnClientFileSelected(sender, args){
var image = document.getElementById("imgTheme");
image.src = args.get_fileInputField().value;
}
</script>
in java script i am able to get the image, i have shaw the image control in the alert. But when i saw image source in the alert it show the path "C:\\fakePath\imagefileName", and i am not uploading the image from the c drive.
Thanks
I want to show the selected image as the preview, i have used below code but it is not working and tools.
i am using Visual Studio 2010 Premium,
<telerik:RadUpload ID="RadUpload1" runat="server" OnClientFileSelected="OnClientFileSelected" AllowedFileExtensions=".bmp,.jpeg,.jpg,.gif" MaxFileSize="100000000"/>
<asp:Image id = "imgTheme" runat="server" ClientIdMode = "Static"/>
<script type = "test/javascript">
function OnClientFileSelected(sender, args){
var image = document.getElementById("imgTheme");
image.src = args.get_fileInputField().value;
}
</script>
in java script i am able to get the image, i have shaw the image control in the alert. But when i saw image source in the alert it show the path "C:\\fakePath\imagefileName", and i am not uploading the image from the c drive.
Thanks