i have an issue , when i click on YES or NO (radio button) to enable/disable DIV section (EmployerInfo), it causes the whole page to refresh and scrolls back to the top of firefox every browser. i set Autopostback to true and i put MaintainScrollPositionOnPostback="True" in page directive but still it cause full post back and scrolls page to the top.
here is my code:
<asp:RadioButton ID="rdobtnEmploymentYes" GroupName="grpEmploymentYesNo" runat="server" Text="Yes" OnCheckedChanged="check_clicked" AutoPostBack="true" />
<asp:RadioButton ID="rdobtnEmploymentNo" GroupName="grpEmploymentYesNo" runat="server" Text="No" OnCheckedChanged="check_clicked" AutoPostBack="true" />
in .cs file i wrote this fucntion
protected void check_clicked(object sender, EventArgs e)
{
if (rdobtnEmploymentYes.Checked)
{
EmploymentInfo.Visible = true;
}
else
{
EmploymentInfo.Visible = false;
}
IT ENABLES AND DISABLES THE DIV SECTION ,that's fine BUT CAUSES THE PAGE TO SCROLL UP. WHY ???