AJAX Page - Using SetValue

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


input elemets (textbox)



dropdownlist



textarea



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.

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

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




See also SetValue tutorial.

"YOU ARE THE BEST! The first time in my life I've met with such excellent team. Almost instant reply! That's amazing! Thank You Very Much!"

Arsen Memetov
San Computer Antalya, Turkey