Is it possible to set OnCommand property of a button programmatically? I
tried btn.Attributes.Add("OnCommand", "MySub") but this doesn't work.

Thanks.