Thanks
But I did it. There is no need to cheking more options.
I send you code of it with this. Through this code you can Rename the file name and store whole path at Database. You when you want to find image you can eailiy filie it.
<script type="text/javascript">
function ShowImagePreview(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$('#<%=ImgPrv.ClientID%>').prop('src', e.target.result)
.width(240)
.height(150);
};
reader.readAsDataURL(input.files[0]);
}
}
</script>
if (flupImage.HasFile)
{
string name = txt_GPF_CPF.Text;
string ext = Path.GetExtension(flupImage.FileName);
string path = Server.MapPath("~/images/upload_images/" + name + ext);
flupImage.SaveAs(path);
image_path = path;
}
<asp:image id="ImgPrv" height="150px" width="240px" runat="server" />
<br />
<asp:fileupload id="flupImage" runat="server" onchange="ShowImagePreview(this);" />