AJAX Page - Using SetValue

You can set a value to a html element on client from server-side.

input elemets (textbox)



radio button
checked / unchecked

Note: The radio/checkbox button can't be set as checked/uncheked using the SetValue method.
You need to set it manually at the end of the callback.

<input type="radio" id="radioElement" />
<input type="button" value="Callback now!" onclick="ob_post.post(null, 'ServerSetValueRadio', function(checked){document.getElementById('radioElement').checked = checked;});"/>

public bool ServerSetValueRadio() { /* this will return true if need the radio button as checked */ return true; }

See also SetValue tutorial.