Remove form tag from remote page html fetched from ajax request
<p>I want the HTML of remote aspx page to another page on which I am working with ajax request. I want the form tag removed from the remote page HTML  also I want the+ scripts to be executed too which are on remote page.</p>

<p>Remote Page:
Test.aspx:</p>

<pre><code>    &lt;%@ Page Language="C#" %&gt;

&lt;form id="form1" runat="server"&gt;
    &lt;div id="wrapper"&gt;
&lt;asp:textbox runat="server" ID="TextBox1"&gt;&lt;/asp:textbox&gt;
&lt;/div&gt;
&lt;script type="text/javascript"&gt;

    alert('hello');
&lt;/script&gt;

&lt;/form&gt;
</code></pre>

<p>Working Page:</p>

<pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" %&gt;

&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;
&lt;html lang="en-us"&gt;
&lt;head runat="server"&gt;
    &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;form id="form1" runat="server"&gt;
    &lt;div id="foo"&gt;
    &lt;/div&gt;
    &lt;script&gt;


        $.ajax({ url: '/test.aspx',
            data: {},
            dataType: "html",
            success: function (response) {
                $('#foo').html('');
                var fragment = $(response).find('#wrapper');
                $('#foo').append(fragment);

            },
            error: function (xhr, ajaxOptions, thrownError) {

            }
        });
    &lt;/script&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;script runat="server"&gt;


&lt;/script&gt;
</code></pre>
