-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathViewAnswer.aspx
More file actions
58 lines (50 loc) · 3.07 KB
/
ViewAnswer.aspx
File metadata and controls
58 lines (50 loc) · 3.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<%@ Page Title="" Language="C#" MasterPageFile="~/Default.master" AutoEventWireup="true" CodeFile="ViewAnswer.aspx.cs" Inherits="ViewAnswer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<link href="StyleSheet4.css" rel="stylesheet" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="container">
<asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1" Width="100%" BorderStyle="None" ForeColor="White">
<FooterStyle BackColor="#CCCC99" ForeColor="Black" />
<HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
<ItemTemplate>
<asp:Label ID="QuestionsLabel" CssClass="Ques" runat="server" Text='<%# Eval("Question") %>' />
<br />
<span class="cat">Category:</span>
<asp:Label ID="CategoryLabel" runat="server" Text='<%# Eval("Category") %>' />
<br />
<hr />
</ItemTemplate>
<SelectedItemStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
</asp:DataList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:recomConnectionString1 %>" SelectCommand="SELECT [Question], [Category] FROM [Question_tb] WHERE ([QId] = @QId)">
<SelectParameters>
<asp:QueryStringParameter Name="QId" QueryStringField="QId" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<br />
<asp:DataList ID="DataList2" runat="server" DataSourceID="SqlDataSource2" Width="100%" ForeColor="White" CellPadding="4">
<FooterStyle BackColor="#CCCC99" ForeColor="Black" />
<HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
<ItemTemplate>
<asp:Label ID="NameLabel" CssClass="Name" runat="server" Text='<%# Eval("Name") %>' />
<br />
<span class="cat">Answer</span>
<asp:Label ID="AnswerLabel" CssClass="Ans" runat="server" Text='<%# Eval("Answer") %>' />
<br />
<span class="cat">Time</span>
<asp:Label ID="ATimeLabel" CssClass="Ans" runat="server" Text='<%# Eval("ATime") %>' />
<br />
<hr/>
<br />
</ItemTemplate>
<SelectedItemStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
</asp:DataList>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:recomConnectionString1 %>" SelectCommand="SELECT Answer_tb.Answer, [User_tb].Name, Answer_tb.ATime FROM Answer_tb INNER JOIN [User_tb] ON Answer_tb.UId = [User_tb].UId WHERE ([QId] = @QId)">
<SelectParameters>
<asp:QueryStringParameter Name="QId" QueryStringField="QId" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<br />
</div>
</asp:Content>