I have a tab control in a form and user controls are loaded onto each tab page at the form load event. I want to switch between tabs using command buttons within the tab pages, meaning the buttons are in different user controls and not on the form.
tabControl1.SelectedTab = tabPage2;
could not be used because of that. How can I achieve this?
UPDATE
Check:
How to access properties of a usercontrol in C#
Expose the properties as properties of your user control like this:
you can call the same on your
form load eventlike this: