How to extend multiple controls of form in one extended class

Example I have a form with two controls one is button another one is combobox.

Now I want to extend both controls with one extension class.

I have written below code but throwing an error.

[Extensionof(Formcontrolstr(FormName, Button))]

Extensionof(Formcontrolstr(FormName, ComboBox))]

Final Class Class_Extension

{

………………

}

But the above code is throwing error like extension of form is duplicated.

Please suggest if anybody have an Idea to extend multiple controls at once.

Thanks

A single class can’t be both a button and a combobox.

What are you trying to achieve?

Depending on what you need, maybe you should create two extensions calling a common logic, or create a form extension instead of control extensions, or something else…

Thanks Martin, I have done it by using the even handler of the control.