c# - Google maps api in updatepanel - HTML in InfoWindow do not show up on refreshing update panel -
i have google map canvas inside update panel
. map refreshes content(location) every time update panel refreshes. need show content in tabular format in infowindow
.
problem if use html tags
in infowindow shows first time when application loads , when refreshing update panel application freezes. if use plain strings in infowindow content shows every time.
here's code in c# generating tabular content of infowindow.
sb.append("<div id=\"content\"><table>"); foreach (datarow dr in dt.rows) { sb.appendline("<tr><td>" + dr[0].tostring() + "</td></tr>"); } sb.append("</table></div>");
this doesnt works after updating update panel. below code works:
stringbuilder sb = new stringbuilder(); foreach (datarow dr in dt.rows) { sb.appendline(dr[0].tostring()); }
i putting generated string hiddenfield
, using in js file this:
var contentstring = document.getelementbyid('infowindowstring').value; var infowindow = new google.maps.infowindow({ content: contentstring })
can 1 please tell me going wrong.
i checked javascript console in browser , found error message a potentially dangerous request.form value detected client
using following stackoverflow links - this , this found validaterequest set false in page directive: validaterequest="false"
hope helps else facing same problem.
Comments
Post a Comment