I am using __doPostBack
to send data from JavaScript to code behind page in ASP.NET application.
The JavaScript is as follows,
$('.window_month td').on('click', function () {
var idName = this.id;
var selectedid = idName.substring(1);
$('#hidden').val(selectedid);
__doPostBack(idName, '');
});
I am using the variable like this in .cs page,
string s = Request["__EVENTTARGET"];
I want to use this __EVENTTARGET
value outside of page_load
and assign it to a global variable in ASP.NET.
How can I do this?