Introduction :
      Here i will code you how to Preview the Image before uploading, from the client side script. Compatible to all the major browsers. Here on selecting the file from the fileupload control, i will display the image in the div tag,can display in image control too. Here i have written two types of code one for all the browsers and other for FireFox.

ASPX Code :

<!DOCTYPE html >
<head id="Head1" runat="server">
<script type="text/javascript"  src=""></script>
<script language="javascript" type="text/javascript">
        function ImagePreview(ImagePreview) {
            if (navigator.appName != "Netscape") {
                var previewzone = document.getElementById("previewzone");
       = "";
       = "250px";
       = "250px";
            else {
                if (ImagePreview.files && ImagePreview.files[0]) {
                    var reader = new FileReader();
                    $('[id*=ForFF]').css("display", "block");
                    reader.onload = function (e) {
    <form id="form1" runat="server">
        <asp:FileUpload ID="UploadFile" runat="server" onchange="ImagePreview(this)" />
        <div id="previewzone">
        <div id="ForFF" style="display: none;">
            <img id="FFImg" alt="your image" />