Bing Maps bindet man in ASP.NET auf folgende Weise ein:
Die Masterpage muss folgenden DOCTYPE haben:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Besucht auch meine Webseite http://www.xxl-pizza.de
<%@ Page Title="" Language="C#" MasterPageFile="~/Masterpage.Master" AutoEventWireup="true" CodeBehind="map-bing3.aspx.cs" Inherits="Browsertest.map_bing3" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div>
<script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0"></script>
<script type="text/javascript">
document.body.onload = function () { GetMap(); }
function GetMap() {
var map = new Microsoft.Maps.Map(document.getElementById("mapDiv"), { credentials: "bing-map-credentials" });
}
</script>
<div id='mapDiv' style="position: absolute; width: 600px; height: 600px;"></div>
</div>
<a href="http://www.xxl-pizza.de">Link</a>
</asp:Content>
Kommentare zum Snippet