According to an answer here, I can prevent a button from submitting the form by setting its type value to "Button", like so in HTML:
<button type="button">Cancel changes</button>
...but how can I do this in C#? I am creating my controls dynamically, something like this (pseudocode, as I'm away from my IDE):
button btn = new Button
{
CSS = "bla"
}
btn.Type = "Button"; // <- something like this?