In my child page i have an imageButton, which is surrounded by the UpdatePanel.
When the user clicks on the image button a record is removed from my database.
<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>
In my master page i have literal control which displays the records for the current user (something like Records: 10)
The RecordsCount control is updated on the page Load event of the MasterPage
Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
RecordsCount.Text = GetRecordsCount()
End Sub
So here are my questions
- How can i update the
RecordsCountcontrol?
I mean i use postbacks for removing records from the database. And currently the RecordsCount control will be updated if the user hits the Refresh button of the Internet browser. - How could i apply the Jquery Highlight on the
RecordsCountcontrol when the user clicks on thebtnRemovebutton on the child-page?
UPDATE: Well the first question is solved by using javascript
Well it sounds like i have had a happy end!
The RecordsCount control is updated with javascript while the (Attribute Ends With Selector) Jquery was applied successfully via this post