What is the easiest way to find a tab. I want to show some data when I click on tabpage2 or some other tab. I did it like this, but this is not a good solution:
private int findTabPage { get; set; } private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) { if (tabControl1.SelectedTab == tabPage1) findTabPage = 1; if (tabControl1.SelectedTab == tabPage2) findTabPage = 2; }
and to display data:
if (findTabPage == 1) { some code here } if (findTabPage == 2) { some code here }
Is there any other solution like this?
JanOlMajti
source share