Inside my HTML code, there is a radio box styled using ASP.NET RadioButtonList with specific attributes. The second list item is set to be selected by default, however, the problem arises when the page loads as the function dis() is not being called. I want this function to run on page load as well.
After researching online, some sources recommend using the Page.RegisterStartupScript method. However, I am unsure of the exact issue and why this method should be used in this scenario. I would greatly appreciate any insights on why the function is not being called and how to execute it properly.
Edit: Additionally, here is the JavaScript code that is being referenced:
<script type="text/javascript>
function dis()
{
ValidatorEnable(document.getElementById('<%=RequiredFieldValidator32.ClientID%>'), false);
}
function en()
{
ValidatorEnable(document.getElementById('<%=RequiredFieldValidator32.ClientID%>'), true);
}
</script>