We help IT Professionals succeed at work.

Title Error

rcowen00
rcowen00 asked
on
I am trying to implement some address verification into my application.  I have started with the starter instructions (http://code.google.com/apis/maps/documentation/javascript/tutorial.html) and I keep getting the following error.  Any suggestions?

Using the Title property of Page requires a header control on the page. (e.g. <head runat="server" />).
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="maptest.aspx.vb" Inherits="ProVal.maptest" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
  html { height: 100% }
  body { height: 100%; margin: 0; padding: 0 }
  #map_canvas { height: 100% }
</style>
<script type="text/javascript"
    src="http://maps.googleapis.com/maps/api/js?key=XXX&sensor=false">
</script>
<script type="text/javascript">
    function initialize() {
        var latlng = new google.maps.LatLng(-34.397, 150.644);
        var myOptions = {
            zoom: 8,
            center: latlng,
            mapTypeId: google.maps.MapTypeId.ROADMAP
        };
        var map = new google.maps.Map(document.getElementById("map_canvas"),
        myOptions);
    }

</script>
</head>
<body onload="initialize()">
  <div id="map_canvas" style="width:100%; height:100%"></div>
</body>
</html>

Open in new window

Comment
Watch Question

Author

Commented:
I've realized that the problem may not be in the map implementation, but how can I find where the problem is?    I'v listed the full error below.  Any help is appreciated.  Thanks.
Server Error in '/' Application.
--------------------------------------------------------------------------------

Using the Title property of Page requires a header control on the page. (e.g. <head runat="server" />). 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.InvalidOperationException: Using the Title property of Page requires a header control on the page. (e.g. <head runat="server" />).

Source Error: 


Line 4:      Protected Overrides Sub OnLoadComplete(ByVal e As EventArgs)
Line 5:          ' Set the page's title, if necessary
Line 6:          If String.IsNullOrEmpty(Page.Title) OrElse Page.Title = "Untitled Page" Then
Line 7:              ' Determine the filename for this page
Line 8:              Dim fileName As String = System.IO.Path.GetFileNameWithoutExtension(Request.PhysicalPath)
 

Source File: C:\Users\Support\documents\visual studio 2010\Projects\ProVal\ProVal\MyBaseClass.vb    Line: 6 

Stack Trace: 


[InvalidOperationException: Using the Title property of Page requires a header control on the page. (e.g. <head runat="server" />).]
   System.Web.UI.Page.get_Title() +2803406
   ProVal.MyBaseClass.OnLoadComplete(EventArgs e) in C:\Users\Support\documents\visual studio 2010\Projects\ProVal\ProVal\MyBaseClass.vb:6
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2350

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.237

Open in new window

Commented:
Dumb user error in my site.Master page.

I had  <head>

vs

<head id="Head1" runat="server">