Dimpy TheWimpy

Dimpy TheWimpy

  • NA
  • 5
  • 692

Combobox selectedindex doesn't save the index value

Jul 15 2015 12:07 PM
 

I have a few items (A,B,C subprograms) in the combobox and onselectedindexchange, I can get the saved data from database from A then from B and then C, in a sequence. The current design doesn't let me move from A to C directly.

Also, if I am on C my selection in the dropdown the control doesn't move to A or B, it is defaulted to C for some reason.

Here's my code:



protected void nextsubprg_click()

{

numArr = Convert.ToInt32(this.Session["numAr"]);


        arrCount = Convert.ToInt32(this.Session["arrCount"]);


        ArrayList arrNext = (ArrayList)Session["arrProg"];

ArrayList arrNextRow = (ArrayList)Session["arrRow"];

        if (arrCount > numArr + 1)

        {

            numArr++;

            if (numArr + 1 == arrCount)

            {

                this.btnNext.Visible = false;

            }

            else

            {

                this.btnNext.Text = "Next SubProgram: " + arrNext[numArr + 1];

 

            }

 

        else

            this.btnNext.Visible = false;

 

        this.radCBRespRow1C2.Text = arrNext[numArr].ToString();

        this.lblRow2C1.Text = arrNext[numArr].ToString() + " details:";

        this.hfSubRow.Value = arrNextRow[numArr].ToString();

this.btnPrev.Visible = false;

        this.btnPrev.Text = "Previous SubProgram: " + arrNext[numArr - 1];

this.Session["numAr"] = numArr;

        setPageVariableWithData();

        prepareScreenQuestionResponse(Convert.ToInt32(this.hfSubRow.Value));

        this.radDatePickerRow2C2.Focus();