I have a page which outputs HTML in ASP.NET webforms.
I am making a request to this page via:
$(document).ready(function () {
$.get("Preview.aspx?ID=1", function (data) {
alert("Data Loaded: " + data);
});
});
The problem is that the preview.aspx page returns HTML with form elements in it. I want to replace these form elements with nothing.
How do I remove all form elements from the data object above?
EDIT: Just to be clear, I need to keep all HTML in place, only replacing form elements.
EDIT 2: Sorry I should have been more clear. This is for an HTML newsletter. Basically the page is pure HTML but being web forms (yuck) there is all the form mumbo jumbo. I want to get the content of this page without the form elements. So far the ideas below are not working. The .load works, but when I add the :not('form') the HTML is incorrectly formatted. The get var elem = $(data).find('form').html(); returns null even though the form is definitely there when I do an alert(data).