I am rendering the dom from a file which works just fine. Then I manipulate the dom with jQuery with a on click event.
My question is: How can I get the manipulated element from code behind now?
$(document).ready(function() {
var x = $(".class");
x.on("click", function() {
$(this).addClass("editable");
});
});
public static string filePath = HttpContext.Current.Request.PhysicalApplicationPath;
public static string file = filePath + "/templates/index.html";
public CQ dom = CQ.CreateFromFile(file);
protected void Page_Load(object sender, EventArgs e)
{
var html = dom.Render();
if (!IsPostBack)
{
Response.Write(html);
}
}
protected void btnSave_OnClick(object sender, EventArgs e)
{
var editable = dom.Select(".simplecms.editable").Text();
// Obviously this string will contain the value from the original dom, how can I retrieve the manipulated dom here?
}