Rank: Member Groups: Member
Joined: 9/9/2007 Posts: 18
|
Hello,
It is possible to add trigger to button where CallbackPanel in masterpage if button in ContentPlaceHolder.
Master page : <eo:CallbackPanel ID="CallbackPanel1" runat="server" Height="150px" Width="200px" Triggers="{ControlID:??????;Parameter:}"> <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> </eo:CallbackPanel>
Page :
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:Button ID="Button1" runat="server" Text="Button" /> </asp:Content>
Button1 or Button1 ClientID causes an error and onclick="eo_Callback('Button1 ClientID', '')" do not trigger off event TextBox1.Click
Thanks
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
The trigger must be in the same "code unit" as the CallbackPanel. There are two options:
1. One option is to add ContentPlaceHolder1 as the trigger, that way everything in ContentPlaceHolder1 will trigger the callback;
2. You can also use two CallbackPanels and "bind" them together. You can place one in your master page (say CallbackPanelM), and another (say CallbackPaneC) in your content page. You would then set Button1 as a trigger for CallbackPanelC. That way when Button1 clicks, CallbackPanelC will be triggered.
You can now set both CallbackPanelM and CallbackPanelC's GroupName to the same value. That way you tie both CallbackPanels together. This way when CallbackPanelC is triggered, CallbackPanelM is also triggered.
All events will still be fired on CallbackPanelC, no event will be fired on CallbackPanelM.
Hope this helps.
Thanks
|
Rank: Member Groups: Member
Joined: 9/9/2007 Posts: 18
|
Thank you for this quick answer
|