Solved

google maps from codebehind

Posted on 2011-02-22
2
389 Views
Last Modified: 2013-12-17
Hi guys.

I have a iframe at my .aspx page:
<iframe runat="server" id="gMapss" width="400" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"></iframe>

From my .aspx.cs page I try :
gMapss.Attributes["src"] = "http://maps.google.dk/maps?f=q&source=s_q&hl=da&geocode=&q=Jernbanegade+27,+Kolding&aq=&sll=55.491924,9.482296&ie=UTF8&hq=&hnear=Jernbanegade+27,+6000+Kolding&ll=55.495534,9.482489&spn=0.017017,0.036478&z=14&iwloc=A&output=embed";
           
But it dosen´t work, It works if I parse the map code in the src="" at the .aspx page. Any suggessions?
0
Comment
Question by:bongii
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
ID: 34956605
I think it is because of all the escaped ampersands in there. Change it to:

gMapss.Attributes["src"] = "http://maps.google.dk/maps?f=q&source=s_q&hl=da&geocode=&q=Jernbanegade+27,+Kolding&amp;aq=&sll=55.491924,9.482296&ie=UTF8&hq=&hnear=Jernbanegade+27,+6000+Kolding&ll=55.495534,9.482489&spn=0.017017,0.036478&z=14&iwloc=A&output=embed";

Open in new window

0
 

Author Comment

by:bongii
ID: 34958620
Thank you :)
Do you know how to show the map only by Latiture and longitude? I don´t have the adress..
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Reactjs with .NET 3 78
JQuery Detecting page post back 6 20
Trigger C# code inside the SQL Server 6 36
Build a string of emails from a gridview 2 19
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question