【发布时间】:2011-03-11 18:19:36
【问题描述】:
在我的子页面中,我有一个 imageButton,它被 UpdatePanel 包围。 当用户单击图像按钮时,一条记录会从我的数据库中删除。
<asp:Content ID="Content1" ContentPlaceHolderID="Content" runat="server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<Triggers><asp:AsyncPostBackTrigger ControlID="btnRemove" /></Triggers>
<ContentTemplate>
<asp:ListView ID="ListView2" runat="server">
<layouttemplate>
<asp:PlaceHolder id="itemPlaceholder" runat="server" />
</layouttemplate>
<ItemTemplate>
<asp:ImageButton ID="btnRemove" runat="server" CommandName='<%# DataBinder.Eval(Container.DataItem, "ID") %>'/></ItemTemplate>
</asp:ListView>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
在我的母版页中,我有文字控制,可以显示当前用户的记录(类似于Records: 10)
RecordsCount 控件在 MasterPage 的页面 Load 事件上更新
Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
RecordsCount.Text = GetRecordsCount()
End Sub
这是我的问题
- 如何更新
RecordsCount控件? 我的意思是我使用回发从数据库中删除记录。目前,如果用户点击 Internet 浏览器的 Refresh 按钮,RecordsCount 控件将被更新。 - 当用户点击子页面上的
btnRemove按钮时,我如何在RecordsCount控件上应用Jquery Highlight?
更新:第一个问题是用javascript解决的
【问题讨论】:
-
你的意思是在控制
RecordsCount上应用类highlight -
@TheSuperTramp 对不起... Jquery 亮点
-
作为输入:stackoverflow.com/questions/4956066/…... 这就是我检索母版页属性的方式。
标签: jquery asp.net master-pages postback master-detail