i can't display the image on my aspx view.. i'm using mysql as database
i have this code for my model:
Imports Microsoft.VisualBasic
Imports System.Data
Public Class ClassPhotosConnection
Inherits ClassConnection
Public Function pictureSelect() As DataTable
Return ReadData("SELECT * FROM pictures")
End Function
End Class
for the controller:
Public Class AdministrationController
Inherits Global.System.Web.Mvc.Controller
Private dPhotos As New ClassPhotosConnection
<AcceptVerbs(HttpVerbs.Get)> _
Function Photos() As ActionResult
Dim _photos As DataTable = dPhotos.pictureSelect()
Return View(_photos)
End Function
End Class
for the view:
<div>
<form action="<%url.action("Photos") %>">
<%Using Html.BeginForm%>
<%Dim _photos As datatable = ViewData.Model%>
<%For count As Integer = 0 To _photos.Rows.Count - 1%>
<img src='<%=_photos.Rows(count).Item("picURL") %>' alt="" />
<p>
<%=_photos.Rows(count).Item("picCaption")%>
</p>
<%Next%>
<%End Using%>
</form>
</div>
the only thing that is displayed is the picCaption..it seems that it cannot call src='<%=_photos.Rows(count).Item("picURL") %>' how else can i display the image?
thank you!