在我的子页面中,我有一个 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 控件将被更新。 - 当用户单击子页面上的按钮时,我如何在控件上应用Jquery Highlight ?
RecordsCount
btnRemove
更新:第一个问题是通过使用javascript解决的