ASP.NET Page /Admin/Video.aspx (C#)
Uses Code Behind Page Page /Admin/Video.aspx.cs (C#)
1: <%@ Page Language="C#" AutoEventWireup="True" Inherits="AdminVideo" Codebehind="Video.aspx.cs" EnableEventValidation="false" %>  
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 id="Head1" 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="cmdRefresh" Text="Refresh" OnClick="cmdRefresh_Click" />  
54:                
55:             <asp:Button runat="server" ID="cmdSave" Text="Save" OnClick="cmdSave_Click" />  
56:             <br />  
57:   
58:             <div class="ClsReorderListContainer">  
59:             <ajaxToolkit:ReorderList ID="ReorderList1" runat="server"  
60:                 PostBackOnReorder="true"  
61:                 DragHandleAlignment="Left"  
62:                 ItemInsertLocation="End"  
63:                 ShowInsertItem="false"  
64:                 CallbackCssStyle="ClsCallBackStyle" >  
65:                   <ItemTemplate>  
66:                     <table border="1" style="width:100%">  
67:                         <tr>  
68:                             <asp:Label runat="server" ID="lblPosition" Visible="false" Text='<%# Bind("VideoPosition") %>'/>  
69:                             <td style="width:30px"><asp:Label runat="server" ID="lblVideoID" Text='<%# Bind("VideoID") %>'/></td>  
70:                             <td style="width:30px"><asp:Label runat="server" ID="VideoDesc" Text='<%# Bind("VideoDesc") %>'/></td>  
71:                             <td style="width:30px"><asp:Button runat="server" ForeColor="Black" ID="btnEdit" Text='Edit' CommandName="Edit" CommandArgument='<%# Bind("VideoID") %>'/></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:   
92:     <table border="1">  
93:     <tr>  
94:         <td>VideoID</td>  
95:         <td>Description</td>  
96:         <td>Video Code</td>  
97:     </tr>  
98:     <tr>  
99:         <td><asp:TextBox runat="server" ID="txtVideoID"/></td>  
100:         <td><asp:TextBox runat="server" ID="txtVideoDesc" /></td>  
101:         <td><asp:TextBox runat="server" ID="txtVideoCode" /></td>  
102:           
103:     </tr>  
104:     <tr>  
105:     <td>  
106:         <asp:Button runat="server" ID="cmdUpdate" Text="Update" OnClick="cmdUpdate_Click" />    
107:         <asp:Button runat="server" ID="cmdInsert" Text="Insert" OnClick="cmdInsert_Click" />  
108:         <asp:Button runat="server" ID="cmdDelete" Text="Delete" OnClick="cmdDelete_Click" />  
109:     </td>  
110:   
111:     </tr>  
112:     </table>  
113:     </form>  
114: </body>  
115: </html>  

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