ASP.NET Page /Admin/ApproveQuestion.aspx (C#)
Uses Code Behind Page Page /Admin/ApproveQuestion.aspx.cs (C#)
1: <%@ Page Language="C#" AutoEventWireup="True" Inherits="QuiznetOnline.Web.UI.Admin.ApproveQuestion" Codebehind="ApproveQuestion.aspx.cs" %>  
2:   
3: <script type="text/javascript" src="../Include/jquery.js"></script>  
4:   
5: <script type="text/javascript">  
6:     function CheckForm() {  
7:   
8:         var cmbTopicCode = document.getElementById('FormView1_cmbTopicCode')  
9:         var txtAuthorRating = document.getElementById('FormView1_txtAuthorRating')  
10:   
11:         if (txtAuthorRating.value == '') {  
12:             alert("Need a valid rating (1-5)")  
13:             return false;  
14:         }  
15:         else  
16:             if (cmbTopicCode.value == 'new') {  
17:                 alert("Need a valid topic code")  
18:                 return false;  
19:             }  
20:         else  
21:             return true;  
22:     }  
23:   
24:     function Encode() {  
25:         var txtEncodeDecode = document.getElementById('FormView1_txtEncodeDecode');  
26:   
27:         $(document).ready(function () {  
28:             $.ajax  
29:             ({  
30:                 type: "POST",  
31:                 contentType: "application/json; charset=utf-8",  
32:                 url: "/WebServices/Tools.asmx/StringEncode",  
33:                 data: "{str:'" + txtEncodeDecode.value + "'}",  
34:                 dataType: "json",  
35:                 success: function (response)  
36:                     {  
37:                         txtEncodeDecode.value = response.d;  
38:                     },  
39:                 failure: function (msg) {  
40:                     alert(msg);  
41:                 }  
42:             });  
43:         });  
44:     }  
45:   
46:     function Decode() {  
47:         var txtEncodeDecode = document.getElementById('FormView1_txtEncodeDecode');  
48:   
49:         $(document).ready(function () {  
50:             $.ajax  
51:             ({  
52:                 type: "POST",  
53:                 contentType: "application/json; charset=utf-8",  
54:                 url: "/WebServices/Tools.asmx/StringDecode",  
55:                 data: "{str:'" + txtEncodeDecode.value + "'}",  
56:                 dataType: "json",  
57:                 success: function (response) {  
58:                     txtEncodeDecode.value = response.d;  
59:                 },  
60:                 failure: function (msg) {  
61:                     alert(msg);  
62:                 }  
63:             });  
64:         });  
65:     }  
66: </script>  
67:   
68: <html xmlns="http://www.w3.org/1999/xhtml" >  
69: <head runat="server">  
70:     <title>Admin - Approve questions</title>  
71: </head>  
72: <body>  
73:     <form id="form1" runat="server">  
74:   
75:   
76:     <asp:HyperLink ID="lblHome" runat="server" NavigateUrl="~/Admin/Default.aspx">Home</asp:HyperLink>  
77:     <div>  
78:            
79:       
80:      <asp:SqlDataSource ID="SqlDataSource2" runat="server" SelectCommand="SELECT * FROM [Topic]"></asp:SqlDataSource>  
81:       
82:     </div>  
83:     <table border="1" width="100%">  
84:     <tr>  
85:         <td width="100%" colspan="2">  
86:             <table>  
87:             <tr>  
88:                 <td><asp:TextBox runat="server" ID="txtFind"/></td>  
89:               
90:                 <td><asp:RadioButtonList runat="server" ID="radSearchType">  
91:                     <asp:ListItem Text="Question Search" Selected="True" Value="Question"></asp:ListItem>  
92:                     <asp:ListItem Text="Answer Search" Value="Answer"></asp:ListItem>  
93:                 </asp:RadioButtonList></td>  
94:               
95:                 <td><asp:DropDownList runat="server" ID="lstSearchOption">  
96:                     <asp:ListItem Text="Search any" Value="0" />  
97:                     <asp:ListItem Text="Search all" Value="1" Selected="True" />  
98:                     <asp:ListItem Text="Search exact" Value="2" />  
99:                 </asp:DropDownList></td>  
100:   
101:                 <td><asp:Button runat="server" ID="cmdFind" Text="Find" OnClick="cmdFind_Click" /></td>  
102:   
103:             </tr>  
104:             </table>  
105:   
106:         </td>  
107:         <td></td>  
108:     </tr>  
109:   
110:     <tr>  
111:         <td valign="top" colspan="2">  
112:             <asp:SqlDataSource ID="SqlDataSource1" runat="server"  
113:                 DeleteCommand="DELETE FROM [UserQuestions] WHERE [UserQuestionID] = @original_UserQuestionID"  
114:                 InsertCommand="INSERT INTO [UserQuestions] ([UserQuestionID], [Question], [TopicCode], [Answer1], [Answer2], [Answer3], [Answer4], [Answer5], [Answer], [Explaination], [Approved], [Link], [FullAccessGranted]) VALUES (@UserQuestionID, @Question, @TopicCode, @Answer1, @Answer2, @Answer3, @Answer4, @Answer5, @Answer, @Explaination, @Approved, @Link, @FullAccessGranted)"  
115:                 OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT *,'' as Answer6,'' as Answer7 FROM [UserQuestions] where UserName = '?????????????' UNION SELECT *,'' as Answer6,'' as Answer7 FROM [UserQuestions] where UserName != '?????????????????'"  
116:                 UpdateCommand="UPDATE [UserQuestions] SET [Question] = @Question, [TopicCode] = @TopicCode, [Answer1] = @Answer1, [Answer2] = @Answer2, [Answer3] = @Answer3, [Answer4] = @Answer4, [Answer5] = @Answer5, [Answer] = @Answer, [Explaination] = @Explaination, [Approved] = @Approved, [Link] = @Link WHERE [UserQuestionID] = @original_UserQuestionID">  
117:                 <DeleteParameters>  
118:                     <asp:Parameter Name="original_UserQuestionID" Type="Int32" />  
119:                 </DeleteParameters>  
120:                 <UpdateParameters>  
121:                     <asp:Parameter Name="Question" Type="String" />  
122:                     <asp:Parameter Name="TopicCode" Type="String" />  
123:                     <asp:Parameter Name="Answer1" Type="String" />  
124:                     <asp:Parameter Name="Answer2" Type="String" />  
125:                     <asp:Parameter Name="Answer3" Type="String" />  
126:                     <asp:Parameter Name="Answer4" Type="String" />  
127:                     <asp:Parameter Name="Answer5" Type="String" />  
128:                     <asp:Parameter Name="Answer" Type="Int32" />  
129:                     <asp:Parameter Name="Explaination" Type="String" />  
130:                     <asp:Parameter Name="Approved" Type="Boolean" />  
131:                     <asp:Parameter Name="FullAccessGranted" Type="Boolean" />  
132:                     <asp:Parameter Name="Link" Type="String" />  
133:                     <asp:Parameter Name="original_UserQuestionID" Type="Int32" />  
134:                     <asp:Parameter Name="original_Question" Type="String" />  
135:                     <asp:Parameter Name="original_TopicCode" Type="String" />  
136:                     <asp:Parameter Name="original_Answer1" Type="String" />  
137:                     <asp:Parameter Name="original_Answer2" Type="String" />  
138:                     <asp:Parameter Name="original_Answer3" Type="String" />  
139:                     <asp:Parameter Name="original_Answer4" Type="String" />  
140:                     <asp:Parameter Name="original_Answer5" Type="String" />  
141:                     <asp:Parameter Name="original_Answer" Type="Int32" />  
142:                     <asp:Parameter Name="original_Explaination" Type="String" />  
143:                     <asp:Parameter Name="original_Approved" Type="Boolean" />  
144:                     <asp:Parameter Name="original_FullAccessGranted" Type="Boolean" />  
145:                     <asp:Parameter Name="original_Link" Type="String" />  
146:                 </UpdateParameters>  
147:             </asp:SqlDataSource>  
148:             <asp:FormView ID="FormView1" runat="server" AllowPaging="True" DataKeyNames="UserQuestionID"  
149:                 DataSourceID="SqlDataSource1" Width="100%" ondatabound="FormView1_DataBound">  
150:                 <PagerSettings Mode="NextPreviousFirstLast" />  
151: There is a limit of 150 source code lines in the evaluation version
152: There is a limit of 150 source code lines in the evaluation version
153: There is a limit of 150 source code lines in the evaluation version
154: There is a limit of 150 source code lines in the evaluation version
155: There is a limit of 150 source code lines in the evaluation version
156: There is a limit of 150 source code lines in the evaluation version
157: There is a limit of 150 source code lines in the evaluation version
158: There is a limit of 150 source code lines in the evaluation version
159: There is a limit of 150 source code lines in the evaluation version
160: There is a limit of 150 source code lines in the evaluation version
161: There is a limit of 150 source code lines in the evaluation version
162: There is a limit of 150 source code lines in the evaluation version
163: There is a limit of 150 source code lines in the evaluation version
164: There is a limit of 150 source code lines in the evaluation version
165: There is a limit of 150 source code lines in the evaluation version
166: There is a limit of 150 source code lines in the evaluation version
167: There is a limit of 150 source code lines in the evaluation version
168: There is a limit of 150 source code lines in the evaluation version
169: There is a limit of 150 source code lines in the evaluation version
170: There is a limit of 150 source code lines in the evaluation version
171: There is a limit of 150 source code lines in the evaluation version
172: There is a limit of 150 source code lines in the evaluation version
173: There is a limit of 150 source code lines in the evaluation version
174: There is a limit of 150 source code lines in the evaluation version
175: There is a limit of 150 source code lines in the evaluation version
176: There is a limit of 150 source code lines in the evaluation version
177: There is a limit of 150 source code lines in the evaluation version
178: There is a limit of 150 source code lines in the evaluation version
179: There is a limit of 150 source code lines in the evaluation version
180: There is a limit of 150 source code lines in the evaluation version
181: There is a limit of 150 source code lines in the evaluation version
182: There is a limit of 150 source code lines in the evaluation version
183: There is a limit of 150 source code lines in the evaluation version
184: There is a limit of 150 source code lines in the evaluation version
185: There is a limit of 150 source code lines in the evaluation version
186: There is a limit of 150 source code lines in the evaluation version
187: There is a limit of 150 source code lines in the evaluation version
188: There is a limit of 150 source code lines in the evaluation version
189: There is a limit of 150 source code lines in the evaluation version
190: There is a limit of 150 source code lines in the evaluation version
191: There is a limit of 150 source code lines in the evaluation version
192: There is a limit of 150 source code lines in the evaluation version
193: There is a limit of 150 source code lines in the evaluation version
194: There is a limit of 150 source code lines in the evaluation version
195: There is a limit of 150 source code lines in the evaluation version
196: There is a limit of 150 source code lines in the evaluation version
197: There is a limit of 150 source code lines in the evaluation version
198: There is a limit of 150 source code lines in the evaluation version
199: There is a limit of 150 source code lines in the evaluation version
200: There is a limit of 150 source code lines in the evaluation version
201: There is a limit of 150 source code lines in the evaluation version
202: There is a limit of 150 source code lines in the evaluation version
203: There is a limit of 150 source code lines in the evaluation version
204: There is a limit of 150 source code lines in the evaluation version
205: There is a limit of 150 source code lines in the evaluation version
206: There is a limit of 150 source code lines in the evaluation version
207: There is a limit of 150 source code lines in the evaluation version
208: There is a limit of 150 source code lines in the evaluation version
209: There is a limit of 150 source code lines in the evaluation version
210: There is a limit of 150 source code lines in the evaluation version
211: There is a limit of 150 source code lines in the evaluation version
212: There is a limit of 150 source code lines in the evaluation version
213: There is a limit of 150 source code lines in the evaluation version
214: There is a limit of 150 source code lines in the evaluation version
215: There is a limit of 150 source code lines in the evaluation version
216: There is a limit of 150 source code lines in the evaluation version
217: There is a limit of 150 source code lines in the evaluation version
218: There is a limit of 150 source code lines in the evaluation version
219: There is a limit of 150 source code lines in the evaluation version
220: There is a limit of 150 source code lines in the evaluation version
221: There is a limit of 150 source code lines in the evaluation version
222: There is a limit of 150 source code lines in the evaluation version
223: There is a limit of 150 source code lines in the evaluation version
224: There is a limit of 150 source code lines in the evaluation version
225: There is a limit of 150 source code lines in the evaluation version
226: There is a limit of 150 source code lines in the evaluation version
227: There is a limit of 150 source code lines in the evaluation version
228: There is a limit of 150 source code lines in the evaluation version
229: There is a limit of 150 source code lines in the evaluation version
230: There is a limit of 150 source code lines in the evaluation version
231: There is a limit of 150 source code lines in the evaluation version
232: There is a limit of 150 source code lines in the evaluation version
233: There is a limit of 150 source code lines in the evaluation version
234: There is a limit of 150 source code lines in the evaluation version
235: There is a limit of 150 source code lines in the evaluation version
236: There is a limit of 150 source code lines in the evaluation version
237: There is a limit of 150 source code lines in the evaluation version
238: There is a limit of 150 source code lines in the evaluation version
239: There is a limit of 150 source code lines in the evaluation version
240: There is a limit of 150 source code lines in the evaluation version
241: There is a limit of 150 source code lines in the evaluation version
242: There is a limit of 150 source code lines in the evaluation version
243: There is a limit of 150 source code lines in the evaluation version
244: There is a limit of 150 source code lines in the evaluation version
245: There is a limit of 150 source code lines in the evaluation version
246: There is a limit of 150 source code lines in the evaluation version
247: There is a limit of 150 source code lines in the evaluation version
248: There is a limit of 150 source code lines in the evaluation version
249: There is a limit of 150 source code lines in the evaluation version
250: There is a limit of 150 source code lines in the evaluation version
251: There is a limit of 150 source code lines in the evaluation version
252: There is a limit of 150 source code lines in the evaluation version
253: There is a limit of 150 source code lines in the evaluation version
254: There is a limit of 150 source code lines in the evaluation version
255: There is a limit of 150 source code lines in the evaluation version
256: There is a limit of 150 source code lines in the evaluation version
257: There is a limit of 150 source code lines in the evaluation version
258: There is a limit of 150 source code lines in the evaluation version
259: There is a limit of 150 source code lines in the evaluation version
260: There is a limit of 150 source code lines in the evaluation version
261: There is a limit of 150 source code lines in the evaluation version
262: There is a limit of 150 source code lines in the evaluation version
263: There is a limit of 150 source code lines in the evaluation version
264: There is a limit of 150 source code lines in the evaluation version
265: There is a limit of 150 source code lines in the evaluation version
266: There is a limit of 150 source code lines in the evaluation version
267: There is a limit of 150 source code lines in the evaluation version
268: There is a limit of 150 source code lines in the evaluation version
269: There is a limit of 150 source code lines in the evaluation version
270: There is a limit of 150 source code lines in the evaluation version
271: There is a limit of 150 source code lines in the evaluation version
272: There is a limit of 150 source code lines in the evaluation version
273: There is a limit of 150 source code lines in the evaluation version
274: There is a limit of 150 source code lines in the evaluation version
275: There is a limit of 150 source code lines in the evaluation version
276: There is a limit of 150 source code lines in the evaluation version
277: There is a limit of 150 source code lines in the evaluation version
278: There is a limit of 150 source code lines in the evaluation version
279: There is a limit of 150 source code lines in the evaluation version
280: There is a limit of 150 source code lines in the evaluation version
281: There is a limit of 150 source code lines in the evaluation version
282: There is a limit of 150 source code lines in the evaluation version
283: There is a limit of 150 source code lines in the evaluation version
284: There is a limit of 150 source code lines in the evaluation version
285: There is a limit of 150 source code lines in the evaluation version
286: There is a limit of 150 source code lines in the evaluation version
287: There is a limit of 150 source code lines in the evaluation version
288: There is a limit of 150 source code lines in the evaluation version
289: There is a limit of 150 source code lines in the evaluation version
290: There is a limit of 150 source code lines in the evaluation version
291: There is a limit of 150 source code lines in the evaluation version
292: There is a limit of 150 source code lines in the evaluation version
293: There is a limit of 150 source code lines in the evaluation version
294: There is a limit of 150 source code lines in the evaluation version
295: There is a limit of 150 source code lines in the evaluation version
296: There is a limit of 150 source code lines in the evaluation version
297: There is a limit of 150 source code lines in the evaluation version
298: There is a limit of 150 source code lines in the evaluation version
299: There is a limit of 150 source code lines in the evaluation version
300: There is a limit of 150 source code lines in the evaluation version
301: There is a limit of 150 source code lines in the evaluation version
302: There is a limit of 150 source code lines in the evaluation version
303: There is a limit of 150 source code lines in the evaluation version
304: There is a limit of 150 source code lines in the evaluation version
305: There is a limit of 150 source code lines in the evaluation version
306: There is a limit of 150 source code lines in the evaluation version
307: There is a limit of 150 source code lines in the evaluation version
308: There is a limit of 150 source code lines in the evaluation version
309: There is a limit of 150 source code lines in the evaluation version
310: There is a limit of 150 source code lines in the evaluation version
311: There is a limit of 150 source code lines in the evaluation version
312: There is a limit of 150 source code lines in the evaluation version
313: There is a limit of 150 source code lines in the evaluation version
314: There is a limit of 150 source code lines in the evaluation version
315: There is a limit of 150 source code lines in the evaluation version
316: There is a limit of 150 source code lines in the evaluation version
317: There is a limit of 150 source code lines in the evaluation version
318: There is a limit of 150 source code lines in the evaluation version
319: There is a limit of 150 source code lines in the evaluation version
320: There is a limit of 150 source code lines in the evaluation version
321: There is a limit of 150 source code lines in the evaluation version
322: There is a limit of 150 source code lines in the evaluation version
323: There is a limit of 150 source code lines in the evaluation version
324: There is a limit of 150 source code lines in the evaluation version
325: There is a limit of 150 source code lines in the evaluation version
326: There is a limit of 150 source code lines in the evaluation version
327: There is a limit of 150 source code lines in the evaluation version
328: There is a limit of 150 source code lines in the evaluation version
329: There is a limit of 150 source code lines in the evaluation version

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