How can i display an image in image control whose path is stored in database. Please provide me with sample code i have get the path from database but how can i show in in image control . here is my code
[HttpPost]
public ActionResult DisplayPic()
{
string UserName=User.Identity.Name;
var getPath = from p in Session.Query<Registration>()
where p.Email == UserName
select p.Path;
if (getPath.Count() > 0)
{
//display pic???
}
return View();
}
View:
@{
ViewBag.Title = "DisplayPic";
}
<h2>DisplayPic</h2>
@using (Html.BeginForm())
{
<img alt="" src="" width="200" height="200" />
}