I have some div in my page which contains some input elements. Now I want to clone complete html of this div so that I can save it in my database and next time I can retrieve that cloned html and again render it in another page in the exact same way as it was at the time of saving including all input values same as they were at the time of saving.
I am cloing the html of div as:
var htmlObject= $('.mydiv').clone();
now above variable htmlObject is of type object.
Now in c# in my model I've string type of property Html:
public string Html { get; set; }
But when I send htmlObject to my server using ajax call, the Html property is null. My question is what should be the type of property Html so that the htmlOject is catched properly with all its properties preserved so that next time when I retrieve it from db and send it to client the div should be recreated exactly same?