Does there exist a solution for this scenario?
I have a content page which contains an UpdatePanel and has a combobox. When the combobox value is changed I want to change a label in my Master page. So, the main problem for me is that I don't want to make a full postback with every combobox value changing. Is there some trick to overcome full postback?
Thanks in advance.
ShowMessage
) that changes the Text of the Label and calls Update on the Masterpage's UpdatePanel.You can access your MasterPage's functions in the following way(from ContentPage just as UserControls in ContentPage):
((MyMaster)this.Page.Master).ShowMessage(text);
in VB.Net
DirectCast(Me.Page.Master, MyMaster).ShowMessage(text)
Of course you have to replace MyMaster
with the actual type of your MasterPage and implement a public function(sub) that changes the Label's Text(ShowMessage
in this example) and updates the UpdatePanel in the MasterPage. Set its UpdateMode property to Conditional and make sure that the ChildrenAsTriggers property is false and that no explicit triggers are defined for the panel.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With