I have a <table> that has a header row. I’m trying to add an item under the header row, but there seems to be no way to describe this intent to the ActionLink function.
InsertionMode.InsertBefore with the header row’s ID specified as the update target just puts the row on the top of the table, Replace replaces the header of the table, and InsertAfter actually puts a new row inside the header row — which is obviously invalid.
Is there any way to specify that I want to append some HTML after or before a tag?
Thanks in advance.
AFAIK there is no way to achieve such behavior with only properties of the
AjaxOptionsclass. One way would be to subscribe for theOnSuccessmethod and do the insertion manually:and the
successfunction:or if you are using MicrosoftAjax you need to call the
get_datamethod to fetch the returned result from the ajax call: