If you view the rendered HTML in your browser, you will see that you have generated an
onclick
attribute that looks something like:
<input type="checkbox" onclick="return ProceedYN();WebForm_DoPostBackWithOptions(...);">
Clearly, regardless of the value returned from your
ProceedYN
function, the
WebForm_DoPostBackWithOptions
code will never be called, because your handler returns unconditionally.
Change your control to use:
<asp:CheckBox ID="InclSectionCB" OnClick="if(!ProceedYN())return false;" OnCheckedChanged="InclSectionCBChanged" runat="server" AutoPostBack="True" />
Your generated HTML will then look more like:
<input type="checkbox" onclick="if(!ProceedYN())return false;WebForm_DoPostBackWithOptions(...);">
which
will allow the
WebForm_DoPostBackWithOptions
to execute if your
ProceedYN
function returns
true
.