Solved

google maps from codebehind

Posted on 2011-02-22
2
388 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
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

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

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

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

840 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