
to do this I have to refresh the page? if so then I have to keep all the user entered details. Any simple elegant solution please?

to do this I have to refresh the page? if so then I have to keep all the user entered details. Any simple elegant solution please?
Assuming you have a span that contains the asterisk, you can simply use JQuery to clear the text when the checkbox is cleared.
$("#idOfCheckbox").click(function() {
if(this.is(':checked') == true) {
$("#idOfAsterisk").text("");
}
});
Basically you want to toggle a CSS class on that control. So you could use the following for example:
<asp:Label ID="Label1" runat="server" Text="Label" ClientIDMode="Static" EnableViewState="True"></asp:Label>
<input type="checkbox" id="checkbox1" /> <br />
and then some CSS:
/* Required Field Asterix Suffix */
.form-field-required:after {
color: red;
content: " *";
font-weight: bold;
}
and then some JS to do the toggle:
$(document).ready(function() {
$('#checkbox1').click(function() {
if (!$(this).is(':checked')) {
$('#Label1').addClass('form-field-required');
else
$('#Label1').removeClass('form-field-required');
}
});
});
On PostBack because you are keeping the viewstate for Label1 you will still have the asterix or not as needed.