This query is related to this one I asked yesterday. I have a radio button list on my asp.net page defined as follows:
<asp:RadioButtonList ID="rdlSortBy" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow" AutoPostBack="True" >
<asp:ListItem Selected="True">Name</asp:ListItem>
<asp:ListItem>Staff No</asp:ListItem>
</asp:RadioButtonList>
On the client-side, am doing the following validations:
rdlSortBy.Attributes("onclick") = "javascript:return prepareSave() && prepareSearch();"
The problem is that the Javascript validation runs as expected. A message is displayed and I expect to remain on the page until user has saved the changes, instead the page is posted back and effectively I am loosing unsaved changes.
What could be going wrong?