- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
<分区>
我在 aspx 区域的中继器如下所示:此中继器位于母版页内 - 页面基于母版页和内容页
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand">
<ItemTemplate>
<asp:Image ID="imgArrowIconInsideRepeater" runat="server" ImageUrl="~/Images/Login/ArrowIcon.png"
/>
<asp:HiddenField ID="hfFilePath" runat="server" Value='<%# Eval("FilePath")%>' />
<asp:HiddenField ID="hfFileName" runat="server" Value='<%# Eval("FileName")%>' />
<asp:HiddenField ID="hfFileSize" runat="server" Value='<%# Eval("FileSize")%>' />
<asp:HiddenField ID="hfFileCreationDate" runat="server" Value='<%# Eval("FileCreationDate")%>' />
<asp:LinkButton ID="lbFile" runat="server" CommandName="lbFile_Click" CssClass="lbFileInRepeater"
><%# Eval("FileName")%></asp:LinkButton>
<br />
<asp:Label ID="lblFileCreationDate" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "FileCreationDate", "{0:yyyy/MM/dd - tt h:m:s}") %>'
CssClass="lblFileCreationDateInRepeater" ></asp:Label>
|
<asp:Label ID="lblFileSize" runat="server" Text='<%# GetFileSize(Eval("FileSize"))%>'
CssClass="lblFileSizeInRepeater"></asp:Label>
<div class="EmptyDiv">
</div>
</ItemTemplate>
</asp:Repeater>
</ContentTemplate>
</asp:UpdatePanel>
我的母版页中还有一个脚本管理器,如下所示:
<telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnablePageMethods="True">
</telerik:RadScriptManager>
我在后面的代码中的 C# 代码如下所示:
protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
//The Below Line Does Not Work - Always Is Null
//NewAddedFiles currentItem = (NewAddedFiles)e.Item.DataItem;
HiddenField hfFilePath = (HiddenField)e.Item.FindControl("hfFilePath");
HiddenField hfFileName = (HiddenField)e.Item.FindControl("hfFileName");
HiddenField hfFileSize = (HiddenField)e.Item.FindControl("hfFileSize");
HiddenField hfFileCreationDate = (HiddenField)e.Item.FindControl("hfFileCreationDate");
switch (e.CommandName)
{
case "lbFile_Click":
{
if (Session["User_ID"] != null)
{
DataSet dsDownload = DataLayer.Download.Size_By_UserID_Today(int.Parse(HttpContext.Current.Session["User_ID"].ToString()), DateTime.Now);
if (dsDownload.Tables["Download"].Rows.Count > 0)
{
DataRow drDownload = dsDownload.Tables["Download"].Rows[0];
int SumOfFileSize4Today = int.Parse(drDownload["FileSizSum"].ToString());
if (SumOfFileSize4Today + int.Parse(hfFileSize.Value) <= 1073741824)//1 GB = 1024*1024*1024 bytes = 1073741824 bytes
//if (SumOfFileSize4Today + int.Parse(hfFileSize.Value) <= 100000)
{
DataLayer.Download.InsertRow(
int.Parse(HttpContext.Current.Session["User_ID"].ToString()),
DateTime.Now,
hfFilePath.Value,
hfFileName.Value,
hfFileSize.Value,
DateTime.Parse(hfFileCreationDate.Value)
);
Response.Redirect("~/HandlerForRepeater.ashx?path=" + hfFilePath.Value);
}
else
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "YouCanNotDownloadAnyMore_SizeOverload", "YouCanNotDownloadAnyMore_SizeOverload();", true);
}
}
else
{
if (int.Parse(hfFileSize.Value) <= 1073741824)
//if (int.Parse(hfFileSize.Value) <= 100000)
{
DataLayer.Download.InsertRow(
int.Parse(HttpContext.Current.Session["User_ID"].ToString()),
DateTime.Now,
hfFilePath.Value,
hfFileName.Value,
hfFileSize.Value,
DateTime.Parse(hfFileCreationDate.Value)
);
Response.Redirect("~/HandlerForRepeater.ashx?path=" + hfFilePath.Value);
}
else
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "YouCanNotDownloadAnyMore_SizeOverload", "YouCanNotDownloadAnyMore_SizeOverload();", true);
}
}
}
else
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "plzLoginFirst_ForDownload", "plzLoginFirst_ForDownload();", true);
}
break;
}
default:
{
break;
}
}
}
}
我的问题与这些行有关:从 ScriptManager.RegisterStartupScript 开始
为什么这些行在更新面板内不起作用? - 没有更新面板,一切都很好。
提前致谢
嗨,我对 visualforce 中继器控件感到头疼:
我的页面类型为日期字段“日期”,但我似乎无法让中继器按日期显示项目。 我的计划是有一个包含日期、主题和作者的表,并使用 jquery 插件按日期排序。 最佳答案 编辑:如果您将 DocumentTyp
我在这里尝试做的是编写一个函数repeat,它接受一个字符串和一个正整数 n 并返回该字符串重复 n 次。因此 repeat("fho", 3) 将返回字符串“hohoho”。但是,下面的测试程序运行
是否可以始终显示 ASP.NET 转发器的页眉和页脚,无论它是否包含数据? 我很清楚这个问题以前曾被想要显示某种信息性消息的人问过,但在我的情况下,这一切都是为了为客户提供填充相同 Repeater
我需要为我正在从事的 enyo 项目制作一个数据表,该项目最终将显示 Ajax 调用的结果。 This (公然从 ryanjduffy here 窃取)似乎是一个很好的起点,但是当我尝试从按钮事件(而
我们目前使用转发器在每行上显示输入字段、下拉列表、复选框和日历项。所需的功能是允许用户添加最多 10 个(这可能会通过 Web 配置更改)项目(每行)。 在转发器中列出这些是否合适,或者我是否以错误的
我希望一个 asp.net 转发器控件在它指向的实际数据被更新时自行更新。我不是在寻找发生按钮单击并且每次中继器(位于更新面板内)都绑定(bind)到数据源的解决方案。 例如:在我的页面加载中,我有这
我正在尝试用中继器复制以下内容: 页眉是固定的,页脚也由从数据源返回的值固定。我所做的是将报头从中继器中取出。并添加了滚动条的代码 由于页脚需要修复,我不确定如何使该行不滚动。 所以我创建了第二个中
我有一个函数,可以将保存我想要显示的数据的DIV的值写入cooke,cookie代码有效,切换代码有效,但是当页面刷新时,我可以获得中继器列表元素,迭代它们,确定该部分是否应该隐藏,但我不能使用可见,
我正在使用 ASP.NET Repeater显示 的内容.它看起来像这样:
我有一个中继器,如下所示, 现在,我想将 LinkButton 的 Text 值与以下内容绑定(bind
Wicket 有很多 AbstractRepeaters 的实现:ListView、DataView、GridView、Loop、PropertyListView 等。 就我个人而言,我发现很难确定哪
如果写了如下代码: Repeater { model: 10; delegate: Rectangle { width: 200; height: 20; color: "whit
这是我的中继器: " /> 我喂中继器 来自数据库的 4 行数据,前三行 是必要的,但最后一个不应该存在。我该怎么做? 最佳答
有一个 routerLink 可以为 config 提供的导航提供必要的路由。 它工作正常,如果它像下面那样完成: Home About
我一直在努力创建自己的带有文本和链接输入字段的自定义 Gutenberg 中继器 block 。我只见过像 this 这样的 ES5 示例和 this .近 8 个小时以来,我一直致力于创建自己的这些
我有一个转发器,可以直接列出来自与我的 Outlook 绑定(bind)的应用程序的电子邮件。我需要中继器列出文件夹名称,然后列出该文件夹中的每条消息。然而,我得到的是该文件夹中每条消息的文件夹名称都
我有一个绑定(bind)服务器端的中继器控件。它重复一系列的 div,并且这样做没有问题。我有一些按钮用于对中继器进行排序(最新的、排名最高的、随机的),这按其应有的方式工作。 我想通过使用 Ajax
我们目前在现场有设备运行 UltraVNC 作为 VNC 服务器。因为我们的现场设备具有不可路由的 IP 地址,所以我们选择使用 UltraVNC 中继器服务器。 VNC 在设备上启动,我们在连接到中
.keyup 和 .change 仅在第一个输入中触发,但在我添加新项目后不会触发。添加新字段时有没有办法触发 .keyup 和 .change ? http://jsfiddle.net/q8pco
我是一名优秀的程序员,十分优秀!