在我的子頁面中,我有一個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控制更新的母版
的頁面加載事件Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
RecordsCount.Text = GetRecordsCount()
End Sub
因此,這裏是我的問題
- 如何更新
RecordsCount
控件? 我的意思是我使用回傳從數據庫中刪除記錄。如果用戶點擊互聯網瀏覽器的刷新按鈕,當前RecordsCount控件將被更新。 - 當用戶點擊子頁面上的
btnRemove
按鈕時,我怎麼能在RecordsCount
控件上應用Jquery Highlight?
UPDATE:那麼第一個問題是使用JavaScript
成功應用於您的意思是在控制應用類''highlight''RecordsCount – 2011-03-11 18:24:59
@TheSuperTramp對不起
的RecordsCount控制與JavaScript更新。 .. jquery亮點 – OrElse 2011-03-11 18:29:12
只是一個輸入:http://stackoverflow.com/questions/4956066/how-do-i-access-properties-from-page-in-contentplaceholder-in-my-masterpage ... this是我如何檢索母版頁的屬性。 – 2011-03-11 18:34:12