Let\'s say I have
500
(Context: asp.net aspx page) How do I allow a c# code access that value?
<
Use a hidden input box
Put your value in the input box with javascript
//call this method before you postback, maybe on form submit
function SetPostbackValues() {
var hiddenControl = '<%= hiddenControl.ClientID %>';
document.getElementById(hiddenControl).value = 500;
//or some other code to get your value
}
Access the value with the input box on the server side
protected void btnSubmit_Click(object sender, EventArgs e) {
var hiddenValue = hiddenControl.Value;
}