I have a javascript function that I need to call inside my body tags. My javascript fuction looks like this:
function NewExistingPicture(pictureName) {
//code for javascript function
}
And this is what I'm trying to do in HTML:
Existing Photos:
<% foreach (var Photo in Model.ProductThumbnails)
{ %>
NewExistingPicture(<%= Html.Encode(Photo.PhotoName) %>)
<% } %>
Obviously this isn't going to work, but I'm at a loss as to how to pass the function the information from the model.