I have an Ajax actionlink that requests a string in the controller method. I want to insert that string into an attribute of a hyperlink. HOw do I specify the attribute fiel
I'm not sure exactly what you mean but you can provide a set of HTML attributes some versions of the ActionLink extension.
Ajax.ActionLink( string linkText,
string action,
object routeValues,
AjaxOptions ajaxOptions,
object htmlAttributes )
Example:
<%= Ajax.ActionLink( "add",
"AddThing",
new { id = ViewData.Model.ID },
new AjaxOptions { Confirm = "Are you sure?",
UpdateTargetId = "thingList"
},
new { title = "Add a thing to the database." } ); %>