I am developing a web app on asp.net which is online exam system. now, in this i am fetching questions and answers from table on random bases. what i want to do is to ignore a number which is already generated once so that same question will not repeat. following is the code i have used. what to do here??
Random rnd = new Random();
int i = rnd.Next(startid, endid + 1);
getQuestion(i);
public void getQuestion(int no)
{
String str = "select * from asp_easy where no = '"+no+"'";
}