<%: Ajax.ActionLink("View Code Status", "GetCodes", "BvIndex",
new { id = o.Id },
new AjaxOptions { UpdateTargetId = count.ToString() },
new { @id = "h" + count.ToString()}) %>
I want to hide the link after the ajax call is made. I tried doing it onsuccess and oncomplete methods but i was not able to do it.
Any solution for this.
This is the way which i tried onsuccess, i was able to hide it but i am getting an error.
<%: Ajax.ActionLink("View Code Status", "GetCodes", "BvIndex",
new { id = o.Id },
new AjaxOptions {
OnSuccess = "functionhide("+count+")",
UpdateTargetId = count.ToString()
},
new { @id = "h" + count.ToString()})%>
onsuccess function
function functionhide(count) {
$("#h" + (count)).hide();
};
This is working fine but,I am getting an error saying,
Microsoft JScript runtime error: ‘b’ is null or not an object
Try like this:
and then: