i have this code in a grid and I want to have UpdateTargetId of the action link, div id to be changed for each row
<%: Ajax.ActionLink("Select", "GetCodes", "BvIndex", new { id = o.Id }, new AjaxOptions { UpdateTargetId ="Result"})%>
<div id ="Result"></div>
I tried this but i didn't get it
<%: Ajax.ActionLink("Select", "GetCodes", "BvIndex", new { id = o.Id }, new AjaxOptions { UpdateTargetId ="Result"+o.Id})%>
<div id ="Result"+"<%=o.Id%>"></div>
I want to have UpdateTarget id to be changed for each row in the grid, like appending id to it, and then assigning the same id to div in which i have to show the result.
NetDev,
I think I know what you are getting at. You want to loop through some items and create divs and links like so:
What you have is a good start, but have you looked at your rendered HTML? I think that this:
<div id ="Result"+"<%=o.Id%>"></div>
is not doing what you think its doing. The rendered HTML based on that code would look like...well bad.
<div id="Result"+"1"></div>
Try updating your dynamic div id naming to this instead:
Which should then render out in HTML as
<div id="Result1"></div>