getElementById is not working in asp.net
<p>In my application i just want to alert the value in the text box using javascript .</p>

<p>aspx page code</p>

<pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_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;script type="text/javascript"&gt;
        alert("hi");
        alert(document.getElementById('&lt;%=textbox1.ClientID%&gt;').value);
 &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;form id="form1" runat="server"&gt;
    &lt;div&gt;
    &lt;asp:TextBox  runat="server" ID="textbox1"  Text="asdsad"&gt;
            &lt;/asp:TextBox&gt;
    &lt;/div&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>I only get alert 'hi' ..after that i get an error " object required" . whats the reason?</p>
