Challenge:
I tried to add a CheckBox control to the registration page in my newly implemented open source YetAnotherForum asp.net application. And this CheckBox is for Terms and Conditions agreement, so it needs to be checked before the users submit registration form. It looked like the easy way was to use a RequiredFieldValidator to validate the CheckBox control. But unfortunately this RequiredFieldValidator validation Web control does not work with the CheckBox (or CheckBoxList) Web controls. After I set its ControlToValidate property to the ID of the CheckBox, the page threw an HttpException, saying:
"Control ‘controlID’ referenced by the ControlToValidate property of ‘validationControlID’ cannot be validated."
Ok, I can perform the validation check in the postback code or replace the RequiredFieldValidator with CustomValidator control. But this is for a constantly updated open source application, I did not want to change too much source code in case I will get overwritten in the next release. So, I need a quick and dirty way to do this.
As 
When I was approached by a co-worker to come up a quick solution to design a training registration application. The requirement is to display all upcoming training events in calendar view and allow users to register to each training. And upon the registration is submitted, the training department and the user’s supervisor should receive notifications immediately (although not required now, but might need the approval from the supervisor in later development). The deadline is very…, how to say it, … how about this afternoon. Well, while the co-worker asked how to design the database tables and asp.net coding, I suggested why not giving the SharePoint a shot. Since I am the one proposed, then I had to create it for her.
Blog Comments