ASP.NET Page /Admin/QuestionPositioning.aspx (C#)
Uses Code Behind Page Page /Admin/QuestionPositioning.aspx.cs (C#)
1: <%@ Page Language="C#" AutoEventWireup="true" Inherits="QuestionPositioning" Codebehind="QuestionPositioning.aspx.cs" %>  
2: <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>  
3: <%@ Register  
4:     Assembly="AjaxControlToolkit"  
5:     Namespace="AjaxControlToolkit"  
6:     TagPrefix="ajaxToolkit" %>  
7: <%@ Register TagPrefix="asp" Namespace="AjaxControlToolkit" %>  
8:   
9: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
10:   
11: <html xmlns="http://www.w3.org/1999/xhtml" >  
12: <head runat="server">  
13:     <title>Untitled Page</title>  
14:     <link rel="stylesheet" type="text/css" href="~/Include/reorderlist.css" />  
15:     <script src="../Include/jquery-1.3.2-vsdoc2.js" type="text/javascript"></script>  
16:     <script src="../Include/jquery.tablednd_0_5.js" type="text/javascript"></script>  
17:   
18:     <script type="text/javascript">  
19:         $(document).ready(function () {  
20:             $("tr").filter(function () {  
21:                 return $('td', this).length && !$('table', this).length  
22:             }).click(function () {  
23:                 $("table tr").removeClass('currRow');  
24:                 $(this).toggleClass('currRow');  
25:             });  
26:         });  
27:     </script>  
28:   
29:     <style type="text/css">  
30:         .currRow  
31:         {  
32:             background-color:Gray;  
33:             cursor:pointer;  
34:         }    
35:     </style>  
36: </head>  
37: <body>  
38:   
39:     <script type="text/javascript">  
40:         $(document).ready(function () {  
41:             $("#GridView1").tableDnD();  
42:         });  
43:     </script>  
44:   
45:     <form id="form1" runat="server">  
46:         <ajaxToolkit:ToolkitScriptManager runat="Server" ID="ScriptManager1" CombineScripts="false" />  
47:   
48:     <div>  
49:         <asp:HyperLink ID="lblHome" runat="server" NavigateUrl="~/Admin/Default.aspx">Home</asp:HyperLink><br />  
50:             
51:             <br />  
52:             <asp:DropDownList runat="server" ID="cmbTopic" AutoPostBack="true" OnSelectedIndexChanged="cmbTopic_SelectedIndexChanged"/>  
53:             <asp:Button runat="server" ID="cmdSave" Text="Save" OnClick="cmdSave_Click" />  
54:             <br />  
55:   
56:             <div class="ClsReorderListContainer">  
57:             <ajaxToolkit:ReorderList ID="ReorderList1" runat="server"  
58:                 EnableViewState="true"  
59:                 DragHandleAlignment="Left"  
60:                 ItemInsertLocation="Beginning"  
61:                 DataKeyField="QuestionID"  
62:                 SortOrderField="Position"  
63:                 OnItemReorder="ReorderList1_ItemReorder"  
64:                 CallbackCssStyle="ClsCallBackStyle">  
65:                   <ItemTemplate>  
66:                     <table border="1" style="width:100%">  
67:                         <tr>  
68:                             <td style="width:30px"><asp:Label runat="server" ID="lblPosition" Text='<%# Bind("Position") %>'/></td>  
69:                             <td style="width:30px"><asp:CheckBox runat="server" ID="chkIsFree" Checked='<%# Bind("IsFree") %>'/></td>  
70:                             <td style="width:30px"><asp:HyperLink runat="server" ForeColor="Black" ID="hypQuestionID" Target="_blank" Text='<%# Bind("QuestionID") %>' NavigateUrl='<%#String.Format("~/Admin/QuestionsAnswers.aspx?QuestionID={0}", Eval("QuestionID"))%>'/></td>  
71:                             <td style="width:1800px"><asp:Label runat="server" ID="lblQuestion" Text='<%# Bind("QuestionDesc") %>'/></td>  
72:                         </tr>  
73:                     </table>  
74:                   </ItemTemplate>  
75:                   <EditItemTemplate>  
76:   
77:                   </EditItemTemplate>  
78:                   <ReorderTemplate>  
79:                         <asp:Panel ID="Panel2" runat="server" CssClass="ClsReorderCue">  
80:                         </asp:Panel>  
81:                   </ReorderTemplate>  
82:                   <DragHandleTemplate>  
83:                         <div class="ClsDragHandle"></div>  
84:                     </DragHandleTemplate>  
85:             </ajaxToolkit:ReorderList>  
86:             </div>  
87:   
88:             <br />  
89:     
90:     </div>  
91:     </form>  
92: </body>  
93: </html>  

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