It appears that ASP.NET WebForms automatically sets the values of the name and value attributes with the value of the ID attribute for an asp:Button. How dou you set custom values for those attributes? I tried it with
MyButton.Attributes["name"] = "CustomName"
but then i have two name attributes in generated html.
I would like to use custom values to determine which button was clicked during a postback. I don't want to use CommandName or CommandArgument because when a postback occurs I just want to check for name and value. I don't want to care about whether a handwritten input element
(like <input type="submit" name="buttons" value="abc"></input>)
caused the postback or a input element generated by asp.net