I need to access the current value of a Server Side variable (stored as a ViewState var) from a Java Script.
var i == <%= OGridItem_ItemIndex %>
but, If I set the value in Server code, and on Client Side try to Access it, I get it's previous (initial value) , not it's new current value??
I have RadAjax Manager and grid on page and all ajaxified ControlId's and UpdatedControls in it. And that Server set Viewstate Var is not nor seems to be able to be.
Script and Grid are wrapped in RadCodeBlocks.
If I try it a few times, it always returns the Previous not current value.
The current Value is set in C# after a straightforward __DoPOstback(Arg_Source, EventArgs). The rest of the Controls on the page are set for Ajax postbacks as per the RadAjaxManager.
How do I retrieve the current value of this ViewState Var when in JS??