I have a radio button list and I want to perform some action when a user makes a selection.
<asp:RadioButtonList id="docList" runat="server" AutoPostBack="true" OnSelectedIndexChanged="loginUser" />
However, I get an empty value for docList.SelectedValue. I am guessing this is due to form data getting cleared upon Autopostback. Is there a way I can have AutoPostBack and not lose form data?
Yes you can by implementing it like this: