I’m trying to change the following working code into Ajax.
<a href="@Url.Action("Index", new { pn = pc })">
<img src="@Url.Content("~/Photos/" + @photoFile[pc])", id = "imgnb" width = "100px" height = "150px" alt = "Photo" /></a> <br />
The code needs to handle a string[] variable, @photoFile[pc]), and take formatting, ( id = "imgnb" width = "100px" height = "150px" alt = "Photo"). (imgnb is css, no image border)
Soe Moe built an Ajax helper here Problem with ajax.actionlink helper, return string.
His code works great with a static image with no paratmeters.
@Ajax.ImageActionLink("../../Photos/Children/albersona1.jpg", "Index", new { pn = pc }, new AjaxOptions
{
UpdateTargetId = "Selected Thumbnail",
InsertionMode = InsertionMode.Replace,
HttpMethod = "GET" })
Would anyone know how to modify this helper to convert the URL.Action into Ajax so that it handles dynamic images and formatting parameters.
Any help greatly appreciated.
Thanks, Joe
and then: