请高手指点.AJAX 4.0的ReorderList问题
时间:2010-10-12
来源:互联网
我在用ReorderList的时候,发现我的AJAX 4.0的ReorderList不能支持拖动,但是用AJAX提供的Sample可以的.修改Sample为自己的代码,又出现问题.先将代码贴上
HTML code
我用ajax1.0的时候没有出现过这样的问题,请各位高手指点迷津.
PS. css用的是AJAX自带的css和VS 2010创建WEB项目时自带的site.css
HTML code
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="ReorderListTest.WebForm1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxToolkit" %> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <link href="StyleSheet.css" rel="Stylesheet" type="text/css" /> </head> <body> <form id="form1" runat="server"> <ajaxToolkit:ToolkitScriptManager EnablePartialRendering="true" runat="Server" ID="ScriptManager1" /> <div class="demoarea"> <div class="demoheading">ReorderList Demonstration</div> <i>To Do:</i> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <div class="reorderListDemo"> <ajaxToolkit:ReorderList ID="ReorderList1" runat="server" PostBackOnReorder="false" DataSourceID="SqlDataSource1" CallbackCssStyle="callbackStyle" DragHandleAlignment="Left" ItemInsertLocation="Beginning" DataKeyField="id" SortOrderField="pty"> <ItemTemplate> <div class="itemArea"> <asp:Label ID="Label1" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("name"))) %>' /> </div> </ItemTemplate> <EditItemTemplate> <div class="itemArea"> <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("name") %>' ValidationGroup="edit" /> </div> </EditItemTemplate> <ReorderTemplate> <asp:Panel ID="Panel2" runat="server" CssClass="reorderCue" /> </ReorderTemplate> <DragHandleTemplate> <div class="dragHandle"></div> </DragHandleTemplate> <InsertItemTemplate> <!-- bottom border is workaround for IE7 Beta issue where bg doesn't render --> <div style="padding-left:25px; border-bottom:thin solid transparent;"> <asp:Panel ID="panel1" runat="server" DefaultButton="Button1"> <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("name") %>' ValidationGroup="add" /> <asp:Button ID="Button1" runat="server" CommandName="Insert" Text="Add" ValidationGroup="add" /> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ValidationGroup="add" ErrorMessage="Please enter some text" ControlToValidate="TextBox1" /> </asp:Panel> </div> </InsertItemTemplate> </ajaxToolkit:ReorderList> </div> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SELECT [id], [name], [pty] FROM [test] ORDER BY [pty]" UpdateCommand="UPDATE [test] SET pty = @pty WHERE id = @id"> </asp:SqlDataSource> </ContentTemplate> </asp:UpdatePanel> </div> </form> </body> </html>
我用ajax1.0的时候没有出现过这样的问题,请各位高手指点迷津.
PS. css用的是AJAX自带的css和VS 2010创建WEB项目时自带的site.css
作者: goozoomoon 发布时间: 2010-10-12
这些控件网上应该可以搜到很多吧
很久没有用net了,关注一下。。。
很久没有用net了,关注一下。。。
作者: mimang2008110 发布时间: 2010-10-13
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28