Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
hello everyone.
I need to set specific location as source for my images in my custom controller(view)
right now I'm using this code :
<img id="@item.Company"
style="height: auto; width:auto; max-height: 88px;max-width:88px" alt="@item.Id"
src="@Url.Action("MyImage", "MyController", new { path = item.Path, name = item.ImageName })"/>
and the action in controller :
[ChildActionOnly]
public ActionResult MyImage(string path, string name)
{
return File(@"" + path, name);
}
but, it doesn't work.
where could be the problem?
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
render image, using controller
hello everyone.
I need to set specific location as source for my images in my custom controller(view)
right now I'm using this code :
<img id="@item.Company"
style="height: auto; width:auto; max-height: 88px;max-width:88px" alt="@item.Id"
src="@Url.Action("MyImage", "MyController", new { path = item.Path, name = item.ImageName })"/>
and the action in controller :
[ChildActionOnly]
public ActionResult MyImage(string path, string name)
{
return File(@"" + path, name);
}
but, it doesn't work.
where could be the problem?
is working on a reply...