c# - Retrieving some values in array -


hi have array of random question nos (ids). have 1 form label question, radiobutton list answers , next button & checkbox review question. when click next button next(random array) question appears. want question id(array) checked review. how can this? used code follows calculates array (like this:10111) gives 1 value checked & 0 unchecked rather want array of question ids checked :

//code gives array of checked values in terms of 1 & o             int g;             if (chkmark.checked == true)             {                 g = 1;             }             else             {                 g = 0;             }             int[] chkarray = new int[convert.toint32(session["counter"]) - 1];             int[] temp1 = (int[])session["arrofchk"];             int k, no;              if (temp1 == null)                 no = 0;             else                 no = temp.length;             (k = 0; k < no; k++)             {            chkarray[k] = temp1[k];             }             chkarray[j] = g; 

with information have given, best can do. return random number array assume of ints since holds numbers (or ids said).

        int[] questionids = new int[10];         random randomindex = new random(datetime.now.millisecond);         int nextquestion = questionids[randomindex.next(questionids.length - 1)]; 

Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -