>Now as far as that Attibutes collection and adding a handler, that's where I'm a little lost. I did see that idea in some things that I read, but I don't really get it. Will have to take a look at that in more detail later.
You don't really need to worry about this if you can get the text you need in there at the design time. IOW, if the text is static just put it in there. If it's dynamic you can still get it into the HTML using classic ASP tags (<%= this.Caption %> for example).
If you rather do it in code you can use the Form's Attribute collection and add the onsubmit handler. For example:
this.form1.Attributes.Add("onsubmit","alert('form submitting');return true;");
This is the same thing as attaching the onsubmit handler within the HTML, but it gives you control to do this in code so if you need to customize the message or code logic you cna do that here nicely.
In addition there are RegisterClientScriptBlock and RegisterStartupScript which can set up script functions and client code that fires when a form loads.
In essence you can do whatever you do in script in the HTML through code.
I'm not a big fan of doing this though, because unless you really have some logic that requires processing during the generation, there's no need to stick this stuff into your code. It only makes the server code more confusing and less readable...