I have a variable _count in codebehind and accessing it from aspx page as below
var result='<%=_count%>';
Now I want to reset this value from aspx page I tried this but its not working
'<%=_count%>'=0;
You can not reset the value of asp.net server side veraible from javascript until you do postback or sent async call. The code is translated by asp.net on server side and generated html/javascript is sent to client (browswer) Javascript can not access asp.net variables directly. You can assign changed value to hidden field and access that field on server side on postback.
Html
<input type="hidden" runat="server" id="hdn" />
Javascript
document.getElementById('hdn').value = "123";
Code behind
_count = int.Parse(hdn.Value);