[英]Open TextBox value (address) in google maps by clicking button using c#
I got a question: I'm writing a short program, which the user is typing in his/her name, age and adsress. 我有一个问题:我正在编写一个简短的程序,用户输入他/她的姓名,年龄和广告客户。 after that, the user will click the "Load Data" button i created.
之后,用户将单击我创建的“加载数据”按钮。 then their address etc. will be listed in a new form.
那么他们的地址等将以新的形式列出。 and now i got a "Google Maps" button.
现在我有一个“ Google Maps”按钮。 so when they click the "google maps" button, it should open their browser on google maps and pointing at the address they typed in. someone got an idea?
因此,当他们单击“谷歌地图”按钮时,它应在谷歌地图上打开浏览器,并指向他们输入的地址。有人知道吗?
cheers 干杯
The current structure for Google Maps urls is ( source ): Google Maps网址的当前结构为( source ):
http://maps.google.com/maps?t=m&q=Location
So in order to do this, you would want to (assuming that you are using ASP.net): 因此,为了做到这一点,您需要(假设您正在使用ASP.net):
q
parameter (be sure to Html Encode) q
参数中使用此结构来创建地图网址(请务必使用HTML编码) Response.Redirect(googleMapsUrl);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.