The repeater receives values from the request (SqlDataSource), which changes during the search and its values change accordingly. It all happens asynchronously. Values are transferred to the repeater as follows:
<script>
function mark() {
var markers = [
<asp:Repeater ID="rptMarkers" runat="server" DataSourceID="Osnova">
<ItemTemplate>
{
"lat": '<%# Eval("lat")%>',
"lagg": '<%# Eval("lagg")%>',
"url_mark": '<%# Eval("url_mark")%>',
"Name_object": '<%# Eval("Имя объекта")%>',
"Adress": '<%# Eval("Adress")%>' ,
"Number_object": '<%# Eval("Number_object")%>',
"Raion": '<%# Eval("Raion")%>',
"District": '<%# Eval("District")%>',
"Tip": '<%# Eval("Tip")%>',
"Supervisor": '<%# Eval("Supervisor")%>'
}
</ItemTemplate>
<SeparatorTemplate>
,
</SeparatorTemplate>
</asp:Repeater>
];
}
</script>
The problem is that the "markers" array in the script does not update the values (the values from the first request remain there), although the number of rows in the repeater changes. I tried calling this function every time the update panel fires, but the values still do not change:
ScriptManager.RegisterStartupScript(this, GetType(), "text", "mark()", true);