I have already tried the information in How do you automatically set the focus to a textbox when a web page loads?
<asp:TextBox ID="tbSearchLastName" runat="server" style="float:right" CssClass="search" tabindex="1" meta:resourcekey="tbSearchLastNameResource" />
<script type="text/javascript">
window.onload = function () {
document.getElementById("tbSearchLastName").focus();
};
</script>
I want the page focus to be on the textbox when the page loads but I am getting the error:
"Unable to get value of the property 'focus': object is null or undefined"
Thanks.