我在我的aspx页面中使用Kedo UI Window,如下所示。 回发后,窗口内的服务器控件丢失它的值。我知道剑道是客户端库&是不负责我的服务器端控件的状态管理,但为什么它导致他们失去了他们的价值?Kendo UI窗口使服务器控制松动值
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test3.aspx.cs" Inherits="Test3" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Kendo UI Snippet</title>
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.1.112/styles/kendo.common.min.css" />
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.1.112/styles/kendo.rtl.min.css" />
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.1.112/styles/kendo.silver.min.css" />
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.1.112/styles/kendo.mobile.all.min.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.1.112/js/kendo.all.min.js"></script>
</head>
<body>
<form runat="server" id="form1">
<div id="dialog">
<asp:TextBox runat="server" ID="TxtIn" />
</div>
<asp:TextBox runat="server" ID="TxtOut" />
<asp:Button runat="server" ID="Btn" Text="Submit" />
</form>
<script>
$("#dialog").kendoWindow({
actions: ["Minimize", "Maximize"]
});
$("#dialog").data("kendoWindow").center();
</script>
</body>
</html>
在片段上方BTN回传的点击发生后TxtOut保留了它的价值,但TxtIn失去它,为什么我也不清楚。我相信这与Kendo窗口所做的DOM更改有关,但不确定。有人可以解释一下,并提供任何解决方法...
啊!对...有没有解决这个问题的方法?可能会使用一些其他弹出窗口提供插件而不是Kendo UI?你有什么想法吗? – yogi
我只有两个Javascript/Jquery插件(Kendo-UI,Jquery-UI)的知识,那里的行为也是一样的。我们必须手动存储和检索来自/ in hiddenfield/cookie的文本框值。 –