Server tag not working in code behind
<p>I have two aspx pages ... first aspx</p>

<pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs"  Inherits="test1._Default" %&gt;

 &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

 &lt;html xmlns="http://www.w3.org/1999/xhtml" &gt;
 &lt;head runat="server"&gt;
    &lt;title&gt;&lt;/title&gt;


&lt;/head&gt;
&lt;body&gt;
    &lt;form id="form1" runat="server"&gt;
    &lt;input type="hidden" runat ="server" id="test2"/&gt;
    &lt;div id="test" runat= "server"&gt;
   alert("&lt;%=ap%&gt;");


    &lt;/div&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>And in the code behind something like this (FOR the FIRST PAGE):</p>

<pre><code>namespace test1
{
    public partial class _Default : System.Web.UI.Page
    {
         public string ap = "sdadsd";
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected override void Render(HtmlTextWriter writer)
        {
            string html = test.InnerHtml;
            writer.Write(html);
        }
    }
}
</code></pre>

<p>And in the second page i have something like this :</p>

<pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test1.aspx.cs" Inherits="test1.test1" %&gt;

&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

&lt;html xmlns="http://www.w3.org/1999/xhtml" &gt;
&lt;head runat="server"&gt;
    &lt;title&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;form id="form1" runat="server"&gt;
    &lt;div&gt;
    &lt;script src="Default.aspx" type="text/javascript"&gt;&lt;/script&gt;

    &lt;/div&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>when i try to check this i get nothing any help  .....if i take out the server tag and place some string there everything works fine any help ...</p>
