页面加载时显示错误
对象引用未设置为实例
代码有什么问题?
HTML:
<script>
function ShowImagePreview(ImageUploder, previewImage)
{
if (ImageUploder.files && ImageUploder.files[0])
{
var reader = new FileReader();
reader.onload = function (e) {
$(previewImage).attr('src', e.target.result);
}
reader.readAsDataURL(ImageUploder.files[0]);
}
}
</script>
jQuery / javascript
[NotMapped]
public HttpPostedFileBase imageFile { get;set; }
public string imagePath {get;set;}
public Quotation()
{
imagePath = "~/AppFiles/Images/Default.png";
}
型号
ScrollView