C#谷歌地图回发问题 [英] C# google map postback issue

查看:97
本文介绍了C#谷歌地图回发问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我在asp.et应用程序中使用Google Map.在这里,员工可以在地图上绘制位置,并且可以将所选位置保存到数据库中(该位置的经度和纬度).我可以使用JavaScript绘制矩形,但在回发期间无法访问为矩形定义的点.
问题是在postbakc期间清除了存储在隐藏变量中的值.谁能建议我解决该问题的解决方法.
提前谢谢.
问候,
samitha

Hi All
I am using google map in my asp.et applicaiton. Here the employe can draw a location on the map and he can save the selected location to the database (latitudes and longitudes for the location). I can draw a rectangle using javascript but can''t access the points defined for the rectangle during postback.
The issue is during postbakc the values stored in the hidden variables get cleared. Can anybody suggest me a workaround to solve this issue.
Thanks in advance.
Regards,
samitha

推荐答案

在postbakc期间,存储在隐藏变量中的值将被清除
这不会自动发生.您已经编写了一些代码,并且编写方式清除了数据.使用DEBUGGER,查看清除原因和清除时间.
这不是需要解决方法的正常行为.应该可以通过简单的代码修复.
during postbakc the values stored in the hidden variables get cleared
This would not happen automatically. You have written some code and the way it is written clears the data. Use DEBUGGER, look into it why and when it gets cleared.
It is not a normal behavior where a workaround is needed. Simple code fix should do.


我正在尝试在javascript中的隐藏字段中绘制值(纬度和经度),因为我无法直接访问这些点后面的代码.值存储在隐藏的字段中.单击保存按钮后,将生成回发调用,并且将清除隐藏字段中存储的值.这是我面临的问题.我的要求是获取多边形中每个点的值.
I am trying to strore values (latitudes and longitudes) in a hidden field inside the javascript that draws the ploygon as I can''t access those points directly in code behind. The valuses get stored in the hidden filed. As soon as I click the save button a postback call is generated and values stored in the hidden field get cleard. This is the problem I am facing. My requirement is to get the values for each of the points in the polygon.


我建​​议您使用 [ ARTEM谷歌地图控件].所有这些..只需在页面上拖动控件并开始使用它即可.
I recommend you to use [ARTEM GOOGLE MAP CONTROL] for this.. you wouldn''t need to use hidden fields and all that.. just drag control on your page and start using it.


这篇关于C#谷歌地图回发问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆