title: How to show/display the second ListView after selecting a row in the first ListView?
body: <p>I am a new ASP.NET developer and I have to create a quiz engine application. I am using three LiveView controls to show:</p>
  
  <p><em><strong>quiz information</em></strong>, <strong><em>question information (based on the selected quiz on the first ListView)</em></strong>, and <strong><em>answers information (based on the selected question on the second ListView)</em></strong></p>
  
  <p>I have the following database design:</p>
  
  <pre><code>QuizContent Table: ID, QuizID, QuestionID, AnswerID, isCorrect
  Quiz Table: QuizID, Title, Description, isSent
  Question Table: QuestionID, Question, QuestionOrder, AnswerExplanation
  Answers Table: AnswerID, Answer
  </code></pre>
  
  <p><strong>What I want now is the following:</strong> when the user (who is the Admin) comes to the Quiz Engine Page, he should only see the first ListView which is mainly about the Quiz Information. And when he selects one of the quizzes, the second ListView will be displayed with the Question information of that selected quiz and so on for the third ListView. I am only facing problem in showing the second ListView. I don't know how to show it.</p>
  
  <p><strong>So how to do that?</strong></p>
  
  <p>I know I should not post too much code or information, but I have to do it to make it clear:</p>
  
  <pre><code>&lt;div align="center"&gt;
              &lt;asp:ListView ID="ListView1" runat="server" DataKeyNames="QuizID" 
                  DataSourceID="SqlDataSource1" InsertItemPosition="LastItem" &gt;
  
                  &lt;EditItemTemplate&gt;
                      &lt;tr style=""&gt;
                          &lt;td&gt;
                              &lt;asp:ImageButton ID="UpdateButton" ImageUrl="Images/icons/update24.png" ToolTip="Update"  runat="server" CommandName="Update" /&gt;
  
                              &lt;asp:ImageButton ID="CancelButton" ImageUrl="Images/icons/cancel324.png" ToolTip="Cancel" runat="server" CommandName="Cancel" /&gt;
                          &lt;/td&gt;
                          &lt;td&gt;
                              &lt;asp:TextBox ID="TitleTextBox" runat="server" Text='&lt;%# Bind("Title") %&gt;' /&gt;
                          &lt;/td&gt;
                          &lt;td&gt;
                              &lt;asp:TextBox ID="DescriptionTextBox" runat="server" 
                                  Text='&lt;%# Bind("Description") %&gt;' /&gt;
                          &lt;/td&gt;
                      &lt;/tr&gt;
                  &lt;/EditItemTemplate&gt;
                  &lt;EmptyDataTemplate&gt;
                      &lt;table id="Table1" runat="server" style=""&gt;
                          &lt;tr&gt;
                              &lt;td&gt;
                                  No data was returned.&lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/table&gt;
                  &lt;/EmptyDataTemplate&gt;
                  &lt;InsertItemTemplate&gt;
                      &lt;tr style=""&gt;
                          &lt;td&gt;
                              &lt;asp:ImageButton ID="InsertButton" ImageUrl="Images/icons/add24.png" ToolTip="Add"  runat="server" CommandName="Insert" /&gt;
  
                              &lt;asp:ImageButton ID="CancelButton" ImageUrl="Images/icons/clear24.png" ToolTip="Cancel"  runat="server" CommandName="Cancel" /&gt;
                          &lt;/td&gt;
  
                          &lt;%--&lt;td&gt;
                              &amp;nbsp;&lt;/td&gt;--%&gt;
                          &lt;td&gt;
                              &lt;asp:TextBox ID="TitleTextBox" runat="server" Text='&lt;%# Bind("Title") %&gt;' /&gt;
                          &lt;/td&gt;
                          &lt;td&gt;
                              &lt;asp:TextBox ID="DescriptionTextBox" runat="server" 
                                  Text='&lt;%# Bind("Description") %&gt;' /&gt;
                          &lt;/td&gt;
                      &lt;/tr&gt;
                  &lt;/InsertItemTemplate&gt;
                  &lt;ItemTemplate&gt;
                      &lt;tr style=""&gt;
                          &lt;td&gt;
                              &lt;asp:ImageButton ID="DeleteButton" ImageUrl="Images/icons/delete24.png" ToolTip="Delete"  runat="server" CommandName="Delete" /&gt;
  
                              &lt;asp:ImageButton ID="EditButton" ImageUrl="Images/icons/edit24.png" ToolTip="Edit"  runat="server" CommandName="Edit" /&gt;
  
                              &lt;asp:ImageButton ID="SelectButton" ImageUrl="Images/icons/select.png" ToolTip="Select"  runat="server" CommandName="Select" /&gt;
                              &lt;%--&lt;asp:Button ID="SelectButton" runat="server" CommandName="Select" Text="Select" /&gt;--%&gt;
                          &lt;/td&gt;
                          &lt;%--&lt;td&gt;
                              &lt;asp:Label ID="QuizIDLabel" runat="server" 
                                  Text='&lt;%# Eval("QuizID") %&gt;' /&gt;
                          &lt;/td&gt;--%&gt;
                          &lt;td&gt;
                              &lt;asp:Label ID="TitleLabel" runat="server" Text='&lt;%# Eval("Title") %&gt;' /&gt;
                          &lt;/td&gt;
                          &lt;td&gt;
                              &lt;asp:Label ID="DescriptionLabel" runat="server" 
                                  Text='&lt;%# Eval("Description") %&gt;' /&gt;
                          &lt;/td&gt;
                      &lt;/tr&gt;
                  &lt;/ItemTemplate&gt;
                  &lt;LayoutTemplate&gt;
                      &lt;div &gt;&lt;table id="thetable" width="97%" cellpadding="0px" cellspacing="0px" style="margin:0px 0px 0px 0px; border:2px solid #003366; font-size:13px; font-weight:bold;"&gt;
                          &lt;thead&gt;
                              &lt;tr style="background-color:#C6D7B5;"&gt;
                                  &lt;th style="border-bottom:2px solid #003366; "&gt;...&lt;/th&gt;
                                  &lt;th style="border-bottom:2px solid #003366; "&gt;Title&lt;/th&gt;
                                  &lt;th style="border-bottom:2px solid #003366; "&gt;Description&lt;/th&gt;
                              &lt;/tr&gt;
                         &lt;/thead&gt;
                         &lt;tbody&gt;&lt;tr id="itemPlaceholder" runat="server"&gt;&lt;/tr&gt;&lt;/tbody&gt;
                      &lt;/table&gt;&lt;/div&gt;
                  &lt;/LayoutTemplate&gt;
                  &lt;SelectedItemTemplate&gt;
                      &lt;tr style=""&gt;
                          &lt;td&gt;
                              &lt;asp:ImageButton ID="DeleteButton" ImageUrl="Images/icons/delete24.png" ToolTip="Delete" runat="server" CommandName="Delete" /&gt;
  
                              &lt;asp:ImageButton ID="EditButton" ImageUrl="Images/icons/edit24.png" ToolTip="Edit" runat="server" CommandName="Edit" /&gt;
                          &lt;/td&gt;
                          &lt;%--&lt;td&gt;
                              &lt;asp:Label ID="QuizIDLabel" runat="server" 
                                  Text='&lt;%# Eval("QuizID") %&gt;' /&gt;
                          &lt;/td&gt;--%&gt;
                          &lt;td&gt;
                              &lt;asp:Label ID="TitleLabel" runat="server" Text='&lt;%# Eval("Title") %&gt;' /&gt;
                          &lt;/td&gt;
                          &lt;td&gt;
                              &lt;asp:Label ID="DescriptionLabel" runat="server" 
                                  Text='&lt;%# Eval("Description") %&gt;' /&gt;
                          &lt;/td&gt;
                      &lt;/tr&gt;
                  &lt;/SelectedItemTemplate&gt;
              &lt;/asp:ListView&gt;
              &lt;asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                  ConnectionString="&lt;%$ ConnectionStrings:QuizSysDBConnectionString %&gt;" 
  
                  SelectCommand="SELECT * FROM [Quiz]" 
                  DeleteCommand="DELETE FROM [Quiz] WHERE [QuizID] = @QuizID" 
                  InsertCommand="INSERT INTO [Quiz] ([Title], [Description]) VALUES (@Title, @Description)" 
  
  
                  UpdateCommand="UPDATE [Quiz] SET [Title] = @Title, [Description] = @Description WHERE [QuizID] = @QuizID"&gt;
                  &lt;DeleteParameters&gt;
                      &lt;asp:Parameter Name="QuizID" Type="Int32" /&gt;
                  &lt;/DeleteParameters&gt;
                  &lt;InsertParameters&gt;
                      &lt;asp:Parameter Name="Title" Type="String" /&gt;
                      &lt;asp:Parameter Name="Description" Type="String" /&gt;
                  &lt;/InsertParameters&gt;
                  &lt;UpdateParameters&gt;
                      &lt;asp:Parameter Name="Title" Type="String" /&gt;
                      &lt;asp:Parameter Name="Description" Type="String" /&gt;
                      &lt;asp:Parameter Name="QuizID" Type="Int32" /&gt;
                  &lt;/UpdateParameters&gt;
              &lt;/asp:SqlDataSource&gt;
      &lt;/div&gt;
  
      &lt;br /&gt;&lt;br /&gt;
  
      &lt;%--Second ListView that will contain the content of the quiz--%&gt;
      &lt;div align="center"&gt;
          &lt;asp:ListView ID="ListView2" runat="server" DataSourceID="SqlDataSource2" 
              DataKeyNames="QuestionID" InsertItemPosition="LastItem" visible="false"&gt;
  
              &lt;EditItemTemplate&gt;
  
                  &lt;tr style=""&gt;
                      &lt;td&gt;
                          &lt;asp:ImageButton ID="UpdateButton" ImageUrl="Images/icons/update24.png" ToolTip="Update" runat="server" CommandName="Update" /&gt;
  
                          &lt;asp:ImageButton ID="CancelButton" ImageUrl="Images/icons/cancel324.png" ToolTip="Cancel" runat="server" CommandName="Cancel" /&gt;
                      &lt;/td&gt;
                      &lt;%--&lt;td&gt;
                          &lt;asp:Label ID="QuestionIDLabel1" runat="server" 
                              Text='&lt;%# Eval("QuestionID") %&gt;' /&gt;
                      &lt;/td&gt;--%&gt;
                      &lt;td&gt;
                          &lt;asp:TextBox ID="QuestionTextBox" runat="server" 
                              Text='&lt;%# Bind("Question") %&gt;' /&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;asp:TextBox ID="QuestionOrderTextBox" runat="server" 
                              Text='&lt;%# Bind("QuestionOrder") %&gt;' /&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;asp:TextBox ID="AnswerExplanationTextBox" runat="server" 
                              Text='&lt;%# Bind("AnswerExplanation") %&gt;' /&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/EditItemTemplate&gt;
  
              &lt;EmptyDataTemplate&gt;
                  &lt;table runat="server" 
                      style=""&gt;
                      &lt;tr&gt;
                          &lt;td&gt;
                              No data was returned.&lt;/td&gt;
                      &lt;/tr&gt;
                  &lt;/table&gt;
              &lt;/EmptyDataTemplate&gt;
  
              &lt;InsertItemTemplate&gt;
                  &lt;tr style=""&gt;
                      &lt;td&gt;
                          &lt;asp:ImageButton ID="InsertButton" ImageUrl="Images/icons/add24.png" ToolTip="Add" runat="server" CommandName="Insert" /&gt;
  
                          &lt;asp:ImageButton ID="CancelButton" ImageUrl="Images/icons/clear24.png" ToolTip="Cancel"  runat="server" CommandName="Cancel" /&gt;
                      &lt;/td&gt;
                      &lt;%--&lt;td&gt;
                          &amp;nbsp;&lt;/td&gt;--%&gt;
                      &lt;td&gt;
                          &lt;asp:TextBox ID="QuestionTextBox" runat="server" 
                              Text='&lt;%# Bind("Question") %&gt;' /&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;asp:TextBox ID="QuestionOrderTextBox" runat="server" 
                              Text='&lt;%# Bind("QuestionOrder") %&gt;'/&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;asp:TextBox ID="AnswerExplanationTextBox" runat="server" 
                              Text='&lt;%# Bind("AnswerExplanation") %&gt;' /&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
  
              &lt;/InsertItemTemplate&gt;
  
              &lt;ItemTemplate&gt;
                  &lt;tr style=""&gt;
                      &lt;td&gt;
                          &lt;asp:ImageButton ID="DeleteButton" ImageUrl="Images/icons/delete24.png" ToolTip="delete" runat="server" CommandName="Delete" /&gt;
  
                          &lt;asp:ImageButton ID="EditButton" ImageUrl="Images/icons/edit24.png" ToolTip="Edit" runat="server" CommandName="Edit" /&gt;
  
                          &lt;asp:ImageButton ID="SelectButton" ImageUrl="Images/icons/select.png" ToolTip="Select" runat="server" CommandName="Select" /&gt;
                              &lt;%--&lt;asp:Button ID="SelectButton" runat="server" CommandName="Select" Text="Select" /&gt;--%&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;asp:Label ID="QuestionLabel" runat="server" Text='&lt;%# Eval("Question") %&gt;' /&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;asp:Label ID="QuestionOrderLabel" runat="server" 
                              Text='&lt;%# Eval("QuestionOrder") %&gt;' /&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;asp:Label ID="AnswerExplanationLabel" runat="server" 
                              Text='&lt;%# Eval("AnswerExplanation") %&gt;' /&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/ItemTemplate&gt;
  
              &lt;LayoutTemplate&gt;
                  &lt;div &gt;&lt;table id="thetable" width="97%" cellpadding="0px" cellspacing="0px" style="margin:0px 0px 0px 0px; border:2px solid #003366; font-size:13px; font-weight:bold;"&gt;
                          &lt;thead&gt;
                              &lt;tr style="background-color:#C6D7B5;"&gt;
                                  &lt;th style="border-bottom:2px solid #003366; "&gt;...&lt;/th&gt;
                                  &lt;th style="border-bottom:2px solid #003366; "&gt;Question&lt;/th&gt;
                                  &lt;th style="border-bottom:2px solid #003366; "&gt;Question Order&lt;/th&gt;
                                  &lt;th style="border-bottom:2px solid #003366; "&gt;Answer Explanation&lt;/th&gt;
                              &lt;/tr&gt;
                         &lt;/thead&gt;
                         &lt;tbody&gt;&lt;tr id="itemPlaceholder" runat="server"&gt;&lt;/tr&gt;&lt;/tbody&gt;
                      &lt;/table&gt;&lt;/div&gt;     
              &lt;/LayoutTemplate&gt;
              &lt;SelectedItemTemplate&gt;
                  &lt;tr style=""&gt;
                      &lt;td&gt;
                          &lt;asp:ImageButton ID="DeleteButton" ImageUrl="Images/icons/delete24.png" ToolTip="Delete" runat="server" CommandName="Delete" /&gt;
  
                          &lt;asp:ImageButton ID="EditButton" ImageUrl="Images/icons/edit24.png" ToolTip="Edit" runat="server" CommandName="Edit" /&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;asp:Label ID="QuestionLabel" runat="server" Text='&lt;%# Eval("Question") %&gt;' /&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;asp:Label ID="QuestionOrderLabel" runat="server" 
                              Text='&lt;%# Eval("QuestionOrder") %&gt;' /&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;asp:Label ID="AnswerExplanationLabel" runat="server" 
                              Text='&lt;%# Eval("AnswerExplanation") %&gt;' /&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/SelectedItemTemplate&gt;
          &lt;/asp:ListView&gt;
          &lt;/div&gt;
  
          &lt;asp:SqlDataSource ID="SqlDataSource2" runat="server" 
              ConnectionString="&lt;%$ ConnectionStrings:QuizSysDBConnectionString %&gt;" 
              SelectCommand="SELECT [Question].* FROM [Question] INNER JOIN [QuizContent] ON [QuizContent].[QuizID] = @QuizID"
  
              DeleteCommand="DELETE FROM [Question] WHERE [QuestionID] = @QuestionID" 
              InsertCommand="INSERT INTO [Question] ([Question], [QuestionOrder], [AnswerExplanation]) VALUES (@Question, @QuestionOrder, @AnswerExplanation)" 
  
  
              UpdateCommand="UPDATE [Question] SET [Question] = @Question, [QuestionOrder] = @QuestionOrder, [AnswerExplanation] = @AnswerExplanation WHERE [QuestionID] = @QuestionID"&gt;
  
                  &lt;DeleteParameters&gt;
                      &lt;asp:Parameter Name="QuestionID" Type="Int32" /&gt;
                  &lt;/DeleteParameters&gt;
                  &lt;InsertParameters&gt;
                      &lt;asp:Parameter Name="Question" Type="String" /&gt;
                      &lt;asp:Parameter Name="QuestionOrder" Type="Int32" /&gt;
                      &lt;asp:Parameter Name="AnswerExplanation" Type="String" /&gt;
                      &lt;asp:ControlParameter ControlID="ListView1" Name="QuizID" PropertyName="SelectedValue" Type="Int32" /&gt;
                  &lt;/InsertParameters&gt;
                  &lt;UpdateParameters&gt;
                      &lt;asp:Parameter Name="Question" Type="String" /&gt;
                      &lt;asp:Parameter Name="QuestionOrder" Type="Int32" /&gt;
                      &lt;asp:Parameter Name="AnswerExplanation" Type="String" /&gt;
                  &lt;/UpdateParameters&gt;
  
              &lt;SelectParameters&gt;
                  &lt;asp:ControlParameter ControlID="ListView1" Name="QuizID" 
                      PropertyName="SelectedValue" Type="Int32" /&gt;
              &lt;/SelectParameters&gt;
          &lt;/asp:SqlDataSource&gt;
  
          &lt;br /&gt;&lt;br /&gt;
  
      &lt;%--Third ListView that will contain the content of the quiz--%&gt;
      &lt;div align="center"&gt;
          &lt;asp:ListView ID="ListView3" runat="server" DataSourceID="SqlDataSource3" 
              DataKeyNames="AnswerID" InsertItemPosition="LastItem"&gt;
  
              &lt;EditItemTemplate&gt;
  
                  &lt;tr style=""&gt;
                      &lt;td&gt;
                          &lt;asp:ImageButton ID="UpdateButton" ImageUrl="Images/icons/update24.png" ToolTip="Update" runat="server" CommandName="Update" /&gt;
  
                          &lt;asp:ImageButton ID="CancelButton" ImageUrl="Images/icons/cancel324.png" ToolTip="Cancel" runat="server" CommandName="Cancel" /&gt;
                      &lt;/td&gt;
                      &lt;%--&lt;td&gt;
                          &lt;asp:Label ID="AnswerIDLabel1" runat="server" Text='&lt;%# Eval("AnswerID") %&gt;' /&gt;
                      &lt;/td&gt;--%&gt;
                      &lt;td&gt;
                          &lt;asp:TextBox ID="AnswerTextBox" runat="server" 
                              Text='&lt;%# Bind("Answer") %&gt;' /&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/EditItemTemplate&gt;
  
              &lt;EmptyDataTemplate&gt;
                  &lt;table runat="server" 
                      style=""&gt;
                      &lt;tr&gt;
                          &lt;td&gt;
                              No data was returned.&lt;/td&gt;
                      &lt;/tr&gt;
                  &lt;/table&gt;
              &lt;/EmptyDataTemplate&gt;
  
              &lt;InsertItemTemplate&gt;
                  &lt;tr style=""&gt;
                      &lt;td&gt;
                          &lt;asp:ImageButton ID="InsertButton" ImageUrl="Images/icons/add24.png" ToolTip="Add" runat="server" CommandName="Insert" /&gt;
  
                          &lt;asp:ImageButton ID="CancelButton" ImageUrl="Images/icons/clear24.png" ToolTip="Cancel" runat="server" CommandName="Cancel" /&gt;
                      &lt;/td&gt;
                      &lt;%--&lt;td&gt;
                          &amp;nbsp;&lt;/td&gt;--%&gt;
                      &lt;td&gt;
                          &lt;asp:TextBox ID="AnswerTextBox" runat="server" 
                              Text='&lt;%# Bind("Answer") %&gt;'/&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
  
              &lt;/InsertItemTemplate&gt;
  
              &lt;ItemTemplate&gt;
                  &lt;tr style=""&gt;
                      &lt;td&gt;
                          &lt;asp:ImageButton ID="DeleteButton" ImageUrl="Images/icons/delete24.png" ToolTip="Delete" runat="server" CommandName="Delete" /&gt;
  
                          &lt;asp:ImageButton ID="EditButton" ImageUrl="Images/icons/edit24.png" ToolTip="Edit" runat="server" CommandName="Edit" /&gt;
                      &lt;/td&gt;
                      &lt;%--&lt;td&gt;
                          &lt;asp:Label ID="AnswerIDLabel" runat="server" Text='&lt;%# Eval("AnswerID") %&gt;' /&gt;
                      &lt;/td&gt;--%&gt;
                      &lt;td&gt;
                          &lt;asp:Label ID="AnswerLabel" runat="server" Text='&lt;%# Eval("Answer") %&gt;' /&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/ItemTemplate&gt;
  
              &lt;LayoutTemplate&gt;
                  &lt;div &gt;&lt;table id="thetable" width="97%" cellpadding="0px" cellspacing="0px" style="margin:0px 0px 0px 0px; border:2px solid #003366; font-size:13px; font-weight:bold;"&gt;
                      &lt;thead&gt;
                          &lt;tr style="background-color:#C6D7B5;"&gt;
                              &lt;th style="border-bottom:2px solid #003366; "&gt;...&lt;/th&gt;
                              &lt;th style="border-bottom:2px solid #003366; "&gt;Answer&lt;/th&gt;
                          &lt;/tr&gt;
                      &lt;/thead&gt;
                      &lt;tbody&gt;&lt;tr id="itemPlaceholder" runat="server"&gt;&lt;/tr&gt;&lt;/tbody&gt;
                  &lt;/table&gt;&lt;/div&gt;
              &lt;/LayoutTemplate&gt;
              &lt;SelectedItemTemplate&gt;
                  &lt;tr style=""&gt;
                      &lt;td&gt;
                          &lt;asp:ImageButton ID="DeleteButton" ImageUrl="Images/icons/delete24.png" ToolTip="Delete" runat="server" CommandName="Delete" /&gt;
  
                          &lt;asp:ImageButton ID="EditButton" ImageUrl="Images/icons/edit24.png" ToolTip="Edit" runat="server" CommandName="Edit" /&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;asp:Label ID="AnswerLabel" runat="server" 
                              Text='&lt;%# Eval("Answer") %&gt;' /&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/SelectedItemTemplate&gt;
          &lt;/asp:ListView&gt;
          &lt;/div&gt;
  
          &lt;asp:SqlDataSource ID="SqlDataSource3" runat="server" 
              ConnectionString="&lt;%$ ConnectionStrings:QuizSysDBConnectionString %&gt;" 
              SelectCommand="SELECT [Answers].* FROM [Answers] INNER JOIN [QuizContent] ON [QuizContent].QuestionID = @QuestionID"
  
              DeleteCommand="DELETE FROM [Answers] WHERE [AnswerID] = @AnswerID" 
              InsertCommand="INSERT INTO [Answers] ([Answer]) VALUES (@Answer)" 
  
  
              UpdateCommand="UPDATE [Answers] SET [Answer] = @Answer WHERE [AnswerID] = @AnswerID"&gt;
                  &lt;DeleteParameters&gt;
                      &lt;asp:Parameter Name="AnswerID" Type="Int32" /&gt;
                  &lt;/DeleteParameters&gt;
                  &lt;InsertParameters&gt;
                      &lt;asp:Parameter Name="Answer" Type="String" /&gt;
                      &lt;asp:ControlParameter ControlID="ListView2" Name="QuestionID" PropertyName="SelectedValue" Type="Int32" /&gt;
                  &lt;/InsertParameters&gt;
                  &lt;UpdateParameters&gt;
                      &lt;asp:Parameter Name="Answer" Type="String" /&gt;
                  &lt;/UpdateParameters&gt;
  
              &lt;SelectParameters&gt;
                  &lt;asp:ControlParameter ControlID="ListView2" Name="QuestionID" 
                      PropertyName="SelectedValue" Type="Int32" /&gt;
              &lt;/SelectParameters&gt;
          &lt;/asp:SqlDataSource&gt;
  </code></pre>
  
  <p><strong>NOTE:</strong>
  I don't have any code-behind. And again the problem is as following: when I run the code, I will see the three ListView controls. It should show only one of them. And when the user selects one of the rows, the second ListView will be displayed and so on for the third ListView.</p>