As the code shows,
On the
Page_Load
it loads the first question as x=0 and on the
Button1_Click
it shows the second question as x becomes 1. Based on the provided code it is doing as you wrote and said.
I assume by saying
"it shows only two questions" you might want to display the question in sequence based on the button click. If that's the case, you might try,
- You might retrieved each question individually based on the current question no which you need to store somewhere, read more about ASP.NET State Management Overview[^]. There might be performance issue for retrieving one question at a time.
Hope it helps :)