ASP.NET MVC is not displaying the image
Posted
by Pinu
on Stack Overflow
See other posts from Stack Overflow
or by Pinu
Published on 2010-04-30T19:39:06Z
Indexed on
2010/04/30
19:47 UTC
Read the original article
Hit count: 219
asp.net-mvc
<asp:Conte
nt ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%-- <h2>Notes</h2>
<% Html.RenderPartial("~/Views/Shared/UserControl/Notes.ascx",Model.Notes); %>
<br />
<h2>User Tracking Informtaion</h2>
<% Html.RenderPartial("~/Views/Shared/UserControl/Tracking.ascx",Model.Log); %>--%>
<div>
<% for (int i = 1; i <= ViewData.Model.SelectedDocument.DocumentPages ; i++)
{ %>
<br />
<img src="<%=DocuvaultMVC.Helpers.AppHelper.PDFUrl(ViewData.Model.SelectedDocument.DocumentID,i)%>" alt="Document" width="612" height="792" />
<%}%>
<div>
</div>
</div>
public static string PDFUrl(int id, int page)
{
return VirtualPathUtility.ToAbsolute("~/ViewDocument.aspx/" + id + "/" + page);
}
© Stack Overflow or respective owner