Tuesday, February 12, 2008 9:00 AM
Ok, I have a signup .aspx form using masterpages and a footer usercontrol with a "Contact Us" form (and a bit more to the layout, but I'll just focus on the to main area to this "Note to Self"). I'll start with the footer since that is the source of my problem.
On the footer, I have a "Contact Us" panel form using the modalpopup AJAX toolkit control which in turn is using validations for that particular form with it's own submit button.
The masterpage, of course, "ties" the footer form to the .aspx signup form.
For the signup .aspx page, most people know to use validation in a signup form. It's a common practice anyway isn't it?
Now that you have an idea of what the form looks like (or just go to http://www.glacsy.com/signup and click on the "Contact Us" link on the bottom to see how everything looks like). I have spent 2 days on this rare occasion trying to figure out "How isn't the signup form submitting?" The form was validating just fine, if not perfect. It was the button not submitting or "working". You click it, nothing happens - no errors, no notices, nothing... So imagine the overwhelming frustration slapping me in my face at that moment. Not a great feeling - especially of what steps I took to solve the issue. You may laugh of what I did - I did anyway.
The first place I researched was on Google. Not much there. Then I figured my local .NET framework was corrupted (yeah I know already, stop laughing). So I re-installed all the .NET frameworks (.NET 2.0, .NET 3.0, .NET 3.5, & .NET 3.5 Extensions Preview). I'm running Vista. After the reinstalls and resetting IIS7 (stop laughing). I tried the form - still nothing (you can laugh now).
By mistake and ONLY by mistake (I still don't know why I clicked on it), after I clicked on the "not working" submit button, I clicked in the "Contact Us" link and found that there were validation error or "fields not filled in" errors. That's when the other hand called "Stupidity" slapped me in my face. I forgot to include "ValidationGroups". Wow, the agony and pain of my face!
Well, I added validationgroups just to the "Contact Us" form (no need to added validationgroups to every form on the site, just need it on that form) and what do you know? Everything WORKS! So, even if you have a form in a usercontrol or in a modalpopup control, use validationgroups...
Note: Be sure to add a validationgroup to both the control being validated and the validator.
Days wasted on this problem: 2 days