I suggest refer to the following article, very nicely explained.
Google Maps in HTML, ASP.NET, PHP, JSP etc. with ease[
^]
Looking at your code, debugging would help. Some hints would be
1. Check what GBrowserIsCompatible is returning
Also
1. most of your tags doesnot have closing tags.
2. check for error in java script
3. onclientclick="disp();"
fixing all the errors on the page should get it running.
following altered code changes map on my machine.
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Google Maps JavaScript API Example</title>
<script src="http://maps.google.com/maps?file=api&v=2&key=abcdefg"
type="text/javascript">
</script>
<script type="text/javascript">
function disp()
{
var lat = document.getElementById('<%= txtlat.ClientID %>').value;
var lng = document.getElementById('<%= txtlng.ClientID %>').value;
load(lat, lng);
alert('inside disp()');
}
function load(a, b)
{
alert('inside load');
if (GBrowserIsCompatible())
{
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(a, b), 15);
var marker = new GMarker(new GLatLng(a, b));
map.addOverlay(marker);
}
}
</script>
</head>
<body>
<div id="map" style="width: 500px; height: 300px"></div>
<form id="form1" runat="server">
<div>
<br />
<asp:Label ID="lbllat" runat="server" Text="Enter the latitude:" Width="130px"/>
<asp:TextBox ID="txtlat" runat="server"/><br />
<br />
<asp:Label ID="lbllng" runat="server" Text="Enter the longitude:" ToolTip=" " Width="130px"/>
<asp:TextBox ID="txtlng" runat="server"/>
<br />
<br />
<asp:Button ID="btnsubmit" runat="server" Text="Submit" onclientclick="disp();"/>
</div>
</form>
</body>
</html>