ASP.NET Page /Admin/UserQuestionRating.aspx (C#)
Uses Code Behind Page Page /Admin/UserQuestionRating.aspx.cs (C#)
1: <%@ Page Language="C#" AutoEventWireup="true" Inherits="UserQuestionRating" Codebehind="UserQuestionRating.aspx.cs" %>  
2:   
3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
4:   
5: <html xmlns="http://www.w3.org/1999/xhtml" >  
6: <head runat="server">  
7:     <title>Untitled Page</title>  
8: </head>  
9: <body>  
10:     <form id="form1" runat="server">  
11:     <div>  
12:         <asp:HyperLink ID="lblHome" runat="server" NavigateUrl="~/Admin/Default.aspx">Home</asp:HyperLink><br />  
13:             
14:             <br />  
15:             <asp:Button runat="server" ID="cmdObsoleteUserQuestionRating" Text="Delete obsolete user question ratings" OnClick="cmdObsoleteUserQuestionRating_Click" />  
16:             <br />  
17:             <br />  
18:             <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"  
19:                 AutoGenerateColumns="False" CellPadding="4" DataSourceID="SqlDataSource1"  
20:                 ForeColor="#333333" GridLines="None" PageSize="50" EnableModelValidation="True" OnRowCommand="GridView1_RowCommand">  
21:                 <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />  
22:                 <Columns>  
23:                     <asp:buttonfield buttontype="Link" commandname="DeleteUserQuestionRating" text="Delete"/>  
24:                     <asp:BoundField DataField="QuestionID" HeaderText="QuestionID" SortExpression="QuestionID" />  
25:                     <asp:BoundField DataField="Rating" HeaderText="Rating"  
26:                         SortExpression="Rating" />  
27:                     <asp:BoundField DataField="Comments" HeaderText="Comments"  
28:                         SortExpression="Comments" />  
29:                     <asp:BoundField DataField="Question" HeaderText="Question"  
30:                         SortExpression="Question" />  
31:                     <asp:BoundField DataField="TopicCode" HeaderText="TopicCode"  
32:                         SortExpression="TopicCode" />  
33:                 </Columns>  
34:                 <RowStyle BackColor="#EFF3FB" />  
35:                 <EditRowStyle BackColor="#2461BF" />  
36:                 <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />  
37:                 <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />  
38:                 <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />  
39:                 <AlternatingRowStyle BackColor="White" />  
40:             </asp:GridView>  
41:         <asp:SqlDataSource ID="SqlDataSource1" runat="server"  
42:             SelectCommand="SELECT UserQuestionRating.QuestionID, UserQuestionRating.Rating, UserQuestionRating.Comments, UserQuestions.Question, UserQuestions.TopicCode FROM UserQuestionRating INNER JOIN UserQuestions ON UserQuestionRating.QuestionID = UserQuestions.UserQuestionID order by UserQuestionRating.QuestionID"  
43:               
44:             ConnectionString="<%$ ConnectionStrings:QuiznetOnline.Data.Properties.Settings.Default.QuizNetOnlineConnectionString %>">  
45:         </asp:SqlDataSource>  
46:       
47:     </div>  
48:     </form>  
49: </body>  
50: </html>  

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