Hi @Emily-J ,
That is: I used the site master for all of pages, when I fill out a form in the page A, then I go to page B and go back, the form is cleared.
Solution:
You could add jquery on your page to set autocomplete on the checkbox. The reason of that you don't success to work your operations is you can't get the id of the checkbox. When you put the checkbox in the ContentPlaceHolder, the id is changed. It will be 'ContentPlaceHolder1_XXX'.So, your operations don't work. You could use the type.
Just like this:
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script src="Scripts/jquery-3.6.0.min.js"></script>
<script>
$(function () {
$('input[type=checkbox]').attr("autocomplete", "off");
})
</script>
</asp:Content>
Best regards,
Yijing Sun
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.