Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
XML
<div class="control-group">
                        <label class="control-label" for="inputName"><i  class="icon-user"></i>Company Logo</label>
                        <div class="controls">
                            <input id="BtnImg" type="file" class="uploadfile" name="Photo" onchange="imagepreview(this);" />

                              <span id="spError1" class="error"></span>

                            <img id="imgprw" src="~/images/profile.jpg" style="width:130px; height:130px" />
                        </div>
                    </div>
Posted
Updated 22-Jul-15 18:52pm
v2
Comments
Member 11854679 23-Jul-15 0:37am    
am beginner in dot net MVC please help me
Member 11854679 23-Jul-15 2:26am    
what i have to do upload file MVC-5 ,angularJS in SPA

1 solution

It's seems like there is no definition for the imagepreview function in your JavaScript's code.

 
Share this answer
 
Comments
Member 11854679 23-Jul-15 2:21am    
please suggest code for this
Shmuel Zang 23-Jul-15 2:41am    
You can add it in a script tag in your page:

<script type="text/javascript">
function imagepreview() {
// Here comes your function's implementation
}
</script>

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900