This is a migrated thread and some comments may be shown as answers.

Control in RadToolTip Posting Back

3 Answers 92 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 29 Jul 2008, 07:05 PM
Hi,

I have a situation where I have an asp:button inside of a tooltip.  The OnClick event of the button fires a postback.  how can I Ajaxify this not to postback?

ASPX
<telerik:RadToolTip ID="TrackerReminderOff" runat="server" TargetControlID="ReminderOff" Position="TopLeft" SkinID="Vista" ShowEvent="OnClick" Animation="Fade"  Width="300" Height="200" ManualClose="true" Visible="true" Sticky="true" EnableViewState="false">
                        <asp:Panel ID="Panel1" runat="server">
                            <asp:Label ID="TrackerReminderOffCMSText" runat="server"></asp:Label><br />
                            <asp:Button ID="TrackerReminderOffButton" runat="server" Text="Turn Off" OnClick="TrackerReminderOffButton_Click" Visible="true"/>
                        </asp:Panel>
                    </telerik:RadToolTip>

Code Behind.
 public void TrackerReminderOffButton_Click(Object sender, EventArgs e)
    {
      //The Profile.DailyTrackerReminder is a database field
        Profile.DailyTrackerReminder = false;
        ReminderOff.Visible = false;
        EmailReminderLabel.Visible = false;
        PleaseRemindMe.Visible = true;

    }

Any thoughts are appreciated.

Thanks,
Rob

3 Answers, 1 is accepted

Sort by
0
Tervel
Telerik team
answered on 30 Jul 2008, 08:48 AM
Hi Rob,

Our suggestion is to use an <asp:UpdatePanel> instead of <asp:Panel>.

Regards,
Tervel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Rob
Top achievements
Rank 1
answered on 30 Jul 2008, 02:55 PM
I tried using the <asp:UpdatePanel as you suggested and now the tooltip is not closing on the the page is not updating at all.

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="always">
                            <ContentTemplate>
                                <asp:Label ID="TrackerReminderOffCMSText" runat="server"></asp:Label><br />
                                <asp:Button ID="TrackerReminderOffButton" runat="server" Text="Turn Off" OnClick="TrackerReminderOffButton_Click" Visible="true"/>
                            </ContentTemplate>
                        </asp:UpdatePanel>

Do I need to add a setting to the tooltip?
This how my control looks:
<telerik:RadToolTip ID="TrackerReminderOff" runat="server" TargetControlID="ReminderOff" Position="TopLeft" SkinID="Vista" ShowEvent="OnClick" Animation="Fade"  Width="300" Height="200" ManualClose="true" Visible="true" Sticky="true" EnableViewState="false">

Thank you,
Rob
0
Rob
Top achievements
Rank 1
answered on 30 Jul 2008, 03:51 PM
I figured it out.  I moved the UpdatePanel around all the controls that need to be updated and it did the trick.

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="always">
                         <ContentTemplate>
                    <asp:Label ID="EmailReminderLabel" runat="server"> Email Reminder:</asp:Label>
                    <asp:LinkButton ID="ReminderOff" runat="server" OnClick="ReminderOff_Click">On</asp:LinkButton>
                    <asp:LinkButton ID="PleaseRemindMe" runat="server" OnClick="PleaseRemindMe_Click" >Please Remind Me!
                    </asp:LinkButton>        
                  
                   
                    <CMS:ContentBlock ID="TrackerReminderOffContentBlock" Visible="false" DefaultContentID="304" runat="server" />
                    <telerik:RadToolTip ID="TrackerReminderOff" runat="server" TargetControlID="ReminderOff" Position="TopLeft" SkinID="Vista" ShowEvent="OnClick" Animation="Fade"  Width="300" Height="200" ManualClose="false" Visible="true" Sticky="true" EnableViewState="false">
                       
                          
                                <asp:Label ID="TrackerReminderOffCMSText" runat="server"></asp:Label><br />
                                <asp:Button ID="TrackerReminderOffButton" runat="server" Text="Turn Off" OnClick="TrackerReminderOffButton_Click" Visible="true"/>
                           
                    </telerik:RadToolTip>
                      
                    <CMS:ContentBlock ID="TrackerPleaseRemindMeContentBlock" Visible="false" DefaultContentID="306" runat="server" />
                    <telerik:RadToolTip ID="TrackerPleaseRemindMe" runat="server" TargetControlID="PleaseRemindMe" Position="TopLeft" SkinID="Vista" ShowEvent="OnClick" Animation="Fade"  Width="500" ManualClose="false" EnableViewState="false">                       
                       
                                <asp:Label ID="PleaseRemindMeCMSText" runat="server"></asp:Label><br />
                                <asp:Button ID="PleaseRemindMeButton" runat="server" Text="Send Reminder" OnClick="PleaseRemindMeButton_Click" Visible="true"/>
                       
                    </telerik:RadToolTip>
                        </ContentTemplate>
                    </asp:UpdatePanel>
Tags
ToolTip
Asked by
Rob
Top achievements
Rank 1
Answers by
Tervel
Telerik team
Rob
Top achievements
Rank 1
Share this question
or