UpdatePanel only update from events

lucubrb

New Member
hello every one my problem goes like thisi have two updatepannels\[code\] <asp:UpdatePanel ID="new_word_panel_UpdatePanel" runat="server" UpdateMode="Conditional"> <ContentTemplate > <asp:Panel ID='new_word_panel' runat="server"> <asp:Button ID='new_word_btn' runat="server" Text='give me a new word' Visible='false' OnClick='GenNewWord' /> </asp:Panel> </ContentTemplate> </asp:UpdatePanel> <asp:UpdatePanel ID="UpdatePanel1" runat="server" > <ContentTemplate > <asp:Button ID='Button8' runat="server" Text='hide' OnClick='hidegive' /> </ContentTemplate> </asp:UpdatePanel> \[/code\]the first updatepanel UpdateMode is set to Conditional so i canupdate is content from the second updatepanel asp:Button ID='Button8' OnClick='hidegive'event easily by using the Update() method.this is the eventhandler:\[code\]protected void hidegive(object sender, EventArgs e) { if (new_word_btn.Visible == true) new_word_btn.Visible = false; else new_word_btn.Visible = true; **new_word_panel_UpdatePanel.Update();** }\[/code\]my problem is that i cant update the first UpdatePanel from reguler method on my page although i am using the Update() method, i have try to update panel from thismethod and nothing hapeens:\[code\]void PlayerWinEventHandler(object sender,Game.PlayerWinEventArgs e) { Session["score"] = int.Parse(Session["score"].ToString()) + 10; UpdateScore(); if (new_word_btn.Visible == true) new_word_btn.Visible = false; else new_word_btn.Visible = true; new_word_btn.Text = "zibi"; **new_word_panel_UpdatePanel.Update();** }\[/code\]thanks for your help...
 
Back
Top