User Control Page /Controls/ViewQuestionsCompletedGrid.ascx (C#)
Uses Code Behind Page Page /Controls/ViewQuestionsCompletedGrid.ascx.cs (C#)
1: <%@ Control Language="C#" AutoEventWireup="True" Inherits="QuiznetOnline.Web.UI.ucViewQuestionsCompletedGrid" Codebehind="ViewQuestionsCompletedGrid.ascx.cs" %>  
2: <%@ Reference Control="~/Master/MasterPage.master"%>  
3:   
4:     <script src="Include/jquery-1.7.2.min.js" type="text/javascript"></script>  
5:     <script src="Include/popup.js" type="text/javascript"></script>  
6:   
7: <!-- In the head section of the page -->  
8:     <script type="text/javascript" src="include/jquery.js"></script>  
9:   
10:     <script type="text/javascript">  
11:   
12:         function wopen(url, name) {  
13:   
14:             var win = window.open(url, name, 'width=900, height=400, ' + 'location=no, menubar=no, ' + 'status=no, toolbar=no, scrollbars=yes, resizable=yes');  
15:         }  
16:     </script>  
17:   
18:   
19:             <table style="height: 100%" class="ViewQuestionsCompletedGrid" width="100%" border="1" align="center">  
20:             <tr style="background-color:blue;color:white">  
21:                 <td align="center">Day/time</td>  
22:                 <td align="center">Correct?</td>  
23:                 <td align="center">Question number and Question</td>  
24:                 <td align="center">Correct answer</td>  
25:                 <td align="center">Location (*=reg. user)</td>  
26:             </tr>  
27:                 <asp:Repeater runat="server" ID="QuestionLogRepeater"  
28:                         OnItemDataBound="QuestionLogRepeater_ItemDataBound" >  
29:                     <itemtemplate>  
30:                         <asp:HiddenField ID="HiddenIsUserGuest" runat="server" Value='<%# DataBinder.Eval(Container.DataItem, "IsUserGuest") %>' />  
31:                         <asp:HiddenField ID="HiddenLink" runat="server" Value='<%# DataBinder.Eval(Container.DataItem, "Link") %>' />  
32:                         <asp:HiddenField ID="HiddenQuestionNumber" runat="server" Value='<%# DataBinder.Eval(Container.DataItem, "QuestionNumber") %>' />  
33:                         <asp:HiddenField ID="HiddenQuestionID" runat="server" Value='<%# DataBinder.Eval(Container.DataItem, "QuestionID") %>' />  
34:                         <tr>  
35:                             <td width="10%">  
36:                                 <asp:Label runat="server" ID="lblQuestionDateTime" Text=<%# DataBinder.Eval(Container.DataItem, "QuestionDateTime")%>></asp:Label>  
37:                             </td>  
38:                             <td><asp:Image ID="Image1" runat="server" ImageUrl=<%# Convert.ToBoolean(DataBinder.Eval(Container.DataItem, "IsCorrect").ToString()) ? "~/Images/tick.gif" : "~/Images/cross.gif"%> /></td>  
39:                             <td>  
40:                                 <table>  
41:                                 <tr>  
42:                                     <td><asp:Label runat="server" ID="lblQuestion" Text=<%# DataBinder.Eval(Container.DataItem, "Question")%>></asp:Label></td>  
43:                                 </tr>  
44:                                 </table>  
45:                             </td>  
46:                             <td><asp:Label runat="server" ID="lblAnswer" Text=<%# DataBinder.Eval(Container.DataItem, "Answer")%>/></td>  
47:                             <td><asp:Label runat="server" ID="lblLocation" Text='<%# DataBinder.Eval(Container.DataItem, "Location") %>'/></td>  
48:                         </tr>  
49:                     </itemtemplate>  
50:                 </asp:Repeater>  
51:             </table>  
52:   

.NET Documentation Tool is © 2002 - 2009 Winnersh Triangle Web Solutions Limited.