I'm trying to use a combo box on a windows form which will change its
display on event of changing combo selection. This is the method I
wrote:
Wrote this code:
private void SurveyChooserCombo_SelectedIndexChanged(object sender,
EventArgs e)
{
if (SurveyChooserCombo.Text.Equals("Survey1"))
SrNo = 1;
else if (SurveyChooserCombo.Text.Equals("Survey2"))
SrNo = 2;
else if (SurveyChooserCombo.Text.Equals("Survey3"))
SrNo = 3;
else
SrNo = 3;
GetResults (SrNo);
}
SrNo, is an int represents survey no. Each time I change the item in
combo, the value of SrNo supposed to be changed, & be passed to
GetResults method, which in turn will change display on the form.
When I run the application the form doesn't change the display as
expected.
Why is that so?
sea#