Within my web application, I am faced with a challenge involving two checkboxes named cb1 and cb2. Each checkbox is associated with an onClick event that verifies if at least one of them has been clicked. If neither checkbox has been clicked, an alert is triggered and any changes are reverted. However, if a valid change has been made (such as checking cb2 before unchecking cb1), the server function checkChange() is called, requiring the object and eventargs as parameters.
I need assistance with the following issues:
- Identifying which checkbox was clicked in order to revert unwanted changes without having to create a separate JavaScript function for each checkbox. It's important that this solution is scalable to accommodate additional checkboxes in the future.
- Understanding how to properly call the server function checkChange(). While I am familiar with "this.Page.GetPostbackEventReference," I am unsure about the required parameters.
Any guidance or insight on these matters would be greatly appreciated. Thank you for taking the time to help.