ASP.NET Page /Admin/Article.aspx (C#)
Uses Code Behind Page Page /Admin/Article.aspx.cs (C#)
1: <%@ Page Language="C#" AutoEventWireup="True" Inherits="AdminArticle" Codebehind="Article.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("ArticlePosition") %>'/>  
69:                             <td style="width:30px"><asp:Label runat="server" ID="lblArticleID" Text='<%# Bind("ArticleID") %>'/></td>  
70:                             <td style="width:60px"><asp:Label runat="server" ID="ArticleDesc" Text='<%# Bind("ArticleDesc") %>'/></td>  
71:                             <td style="width:90px"><asp:Label runat="server" ID="Label1" Text='<%# Bind("ArticleURL") %>'/></td>  
72:                             <td style="width:30px"><asp:Button runat="server" ForeColor="Black" ID="btnEdit" Text='Edit' CommandName="Edit" CommandArgument='<%# Bind("ArticleID") %>'/></td>  
73:                         </tr>  
74:                     </table>  
75:                   </ItemTemplate>  
76:                   <EditItemTemplate>  
77:   
78:                   </EditItemTemplate>  
79:                   <ReorderTemplate>  
80:                         <asp:Panel ID="Panel2" runat="server" CssClass="ClsReorderCue">  
81:                         </asp:Panel>  
82:                   </ReorderTemplate>  
83:                   <DragHandleTemplate>  
84:                         <div class="ClsDragHandle"></div>  
85:                     </DragHandleTemplate>  
86:             </ajaxToolkit:ReorderList>  
87:             </div>  
88:   
89:             <br />  
90:     
91:     </div>  
92:   
93:     <table border="1">  
94:     <tr>  
95:         <td>ArticleID</td>  
96:         <td>Description</td>  
97:         <td>Article URL</td>  
98:     </tr>  
99:     <tr>  
100:         <td><asp:TextBox runat="server" ID="txtArticleID" Enabled="false" BackColor="LightBlue"/></td>  
101:         <td><asp:TextBox runat="server" ID="txtArticleDesc" /></td>  
102:         <td><asp:TextBox runat="server" ID="txtArticleURL" /></td>  
103:           
104:     </tr>  
105:     <tr>  
106:     <td>  
107:         <asp:Button runat="server" ID="cmdUpdate" Text="Update" OnClick="cmdUpdate_Click" />    
108:         <asp:Button runat="server" ID="cmdInsert" Text="Insert" OnClick="cmdInsert_Click" />  
109:         <asp:Button runat="server" ID="cmdDelete" Text="Delete" OnClick="cmdDelete_Click" />  
110:     </td>  
111:   
112:     </tr>  
113:     </table>  
114:     </form>  
115: </body>  
116: </html>  

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