User61956409 posted
Hi Ayub Khan M,
Ayub Khan M
I have set of Questions defined in SQL Server Database table. i want the Questions to be displayed by filtering the data in SQL Server based upon the users team or Specialty.a label has to be created for displaying the question selected from the table and a
text box to take the input for the Question.
You can use ADO.NET to access to your SQL database and retrieve data from database. You can refer to
this article to know more about ADO.NET technologies.
Besides, you are creating and building an ASP.NET WebForm application, you can choose Repeater control to display your questions
in a table layout. The following sample is for your reference.
<asp:Repeater ID="my_repeater" runat="server" OnItemCommand="my_repeater_ItemCommand">
<HeaderTemplate>
<table cellspacing="0" rules="all" border="1">
<tr>
<th scope="col" style="width: 40px">Question Id</th>
<th scope="col" style="width: 80px">Question
</th>
<th scope="col" style="width: 120px">Your Answer
</th>
<th scope="col" style="width: 80px"></th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<asp:Label ID="lblCustomerId" runat="server" Text='<%# Eval("question_id") %>' />
</td>
<td>
<asp:Label ID="lblContactName" runat="server" Text='<%# Eval("question") %>' />
</td>
<td>
<asp:TextBox ID="txtanswer" runat="server" TextMode="MultiLine"></asp:TextBox>
</td>
<td>
<asp:Button ID="btnok" runat="server" Text="Submit" CommandName="submit" />
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>

With Regards,
Fei Han
<sub></sub><sup></sup>