I’m trying to save dynamic html so that on a failed validation in asp. mvc the html on the page gets saved and shown after postback.
I add the html dynamically via jquery .append(), add values to the fields, then on click of the submit button the following javascript functions fires:
function GetInnerHTML(node)
{
$("#hdnTblVal").val(node.html());
}
With node being the containing html tag of the dynamic html. After that the content of is retrieved and saved via session variable.
In IE8 even the input values are saved, but in Firefox and Chrome the values are gone.
HTML:
Javascript (with jQuery):