I am trying to develp a webpage that takes in TO and FROM Addres and displays the Google Map as well the directions.
I understand JScript helps out with the Google Map display and I played around with the URL google.maps.com to get the directions. Now my issue is I have to pass on the data from the C# to JScript and i m struck here..

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 


<html xmlns="http://www.w3.org/1999/xhtml">


    <script src="http://maps.google.com/maps?file=api&v=1
 &key=KEYS" type="text/javascript"> </script>  </head>  <body>
<form id="form1" runat="server">
<div id="map" style="width: 400px; height: 300px; margin-top: 48px;"></div>  <script type="text/javascript">
        var x = -83.022206;
        var y = 39.998264;
        var map = new GMap(document.getElementById("map"));
        var point1 = new GPoint(x,y);
        var marker1 = new GMarker(point1);
        map.centerAndZoom(point1, 3);
        //Add Zoom in Zoom out
        map.addControl(new GLargeMapControl());
        map.addControl(new GMapTypeControl());
        //Add Marker
        var point = new GPoint(-83.015522, 40.002068);
        var marker = new GMarker(point);
    <div id="Div1" style="width: 400px; height: 97px; margin-top: 48px;">&nbsp;&nbsp;&nbsp; TO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 <asp:TextBox ID="TextBox1" runat="server" style="width: 128px; margin-right: 49px"></asp:TextBox>  <br />
&nbsp;&nbsp;&nbsp; FROM&nbsp;<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
  <br /> <asp:Button ID="Button1" runat="server" Height="34px" style="margin-left: 39px" 
            Text="Button" Width="167px" onclick="Button1_Click" />
  <br /> <asp:GridView runat = server ID = "gridview" 
    onselectedindexchanged="gridview_SelectedIndexChanged" AutoGenerateColumns = "false">
<Columns> <asp:TemplateField>    <ItemTemplate>
      <asp:Label ID="Label1" runat ="server" Text ='<% #Eval("value") %>' >
      </ItemTemplate>  </asp:TemplateField>  </Columns>     </asp:GridView>  </div> </form>  </body> </html>

Edited by peter_budo: Correcting code tags

8 Years
Discussion Span
Last Post by __avd
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.