repeater itself is updated, the messagebox was displayed from the c# code, but when the function is called, the original data remains in the array
<script>
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(mark);
Sys.WebForms.PageRequestManager.getInstance().beginAsyncPostBack();
function mark() {
var markers3 = [
<asp:Repeater ID="rptMarkerss" runat="server" DataSourceID="Search_data">
<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>
<% %>
];
alert(markers3.length);
}
</script>