Tooltip linkbutton onclick doesn't ajaxfy but postback the page???

3 posts, 0 answers
  1. Chris
    Chris avatar
    171 posts
    Member since:
    Oct 2006

    Posted 16 Jun 2007 Link to this post

    I have the following code and trying to click on the linkbutton to ajaxfying the onclick event.  However, it doesn't ajaxfying but posting back the page.  (i need it to be ajafy not post back the page)
    Any idea what's wrong?

    <%@ Page Language="C#" %> 
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
    <%@ Register Namespace="Telerik.WebControls" TagPrefix="radI" Assembly="RadInput.NET2"%> 
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <%@ Import Namespace="System" %> 
    <%@ Import Namespace="System.Data" %> 
    <%@ Import Namespace="System.Configuration" %> 
    <%@ Import Namespace="System.Collections" %> 
    <%@ Import Namespace="System.Web" %> 
    <%@ Import Namespace="System.Web.Security" %> 
    <%@ Import Namespace="System.Web.UI" %> 
    <%@ Import Namespace="System.Web.UI.WebControls" %> 
    <%@ Import Namespace="System.Web.UI.WebControls.WebParts" %> 
    <%@ Import Namespace="System.Web.UI.HtmlControls" %> 
    <%@ Import Namespace="System.Reflection" %> 
     
    <script runat="server">  
     
        protected void lnkbtnSubmit_Click(object sender, EventArgs e)  
        {  
            try  
            {  
                if (txtboxInputEmail.Text.Trim() != string.Empty && txtboxInputComments.Text.Trim() != string.Empty)  
                {  
                    //ClientClassFactory.GetCustomerManager().AddEmailToEuronextIntegrationMailingList(txtboxInputEmail.Text.Trim(), txtboxInputComments.Text.Trim());  
     
                    //string str = "CloseToolTip();";  
                    //ScriptManager.RegisterClientScriptBlock(this.Page, typeof(Page), "closeTooltip", str, true);  
                }  
            }  
            catch (Exception ex)  
            {  
                throw ex;  
            }  
        }  
     
    </script> 
     
    <html xmlns="http://www.w3.org/1999/xhtml" > 
    <head runat="server">  
        <title>Untitled Page</title> 
    </head> 
    <body> 
        <form id="form1" runat="server">  
        <div> 
            <asp:ScriptManager id="ScriptManager1" runat="server"/>   
                                        <table cellpadding="0" cellspacing="0" border="0">  
                                        <tr><td style="height: 60px"></td></tr>  
                                        <tr> 
                                            <td class="Head">  
                                                <href="javascript:void();" style="text-decoration:underline;" id="hylnkInput" runat="server">input</a> 
                                                <telerik:RadToolTip ID="toolTipInputForm" runat="server" ManualClose="True" Position="BottomLeft" RelativeTo="Element" ShowEvent="OnClick" Skin="Web20" Sticky="True" TargetControlID="hylnkInput" > 
                                                    <asp:UpdatePanel ID="panelUpdateForm" runat="server">  
                                                        <ContentTemplate> 
                                                            <table cellpadding="2" cellspacing="2" border="0">  
                                                                <tr> 
                                                                    <td colspan="2" align="left"><asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="inputFormGroup" DisplayMode="List" /></td>  
                                                                 </tr> 
                                                                <tr> 
                                                                    <td class="Normal" style="width:40px">Email:</td> 
                                                                    <td> 
                                                                        <asp:RegularExpressionValidator id="inputEmailValidator" runat="server" Display="None" ErrorMessage="Please enter a valid email address" ValidationExpression="^[\w\.\-]+@[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]{1,})*(\.[a-zA-Z]{2,3}){1,2}$" ControlToValidate="txtboxInputEmail" ValidationGroup="inputFormGroup"></asp:RegularExpressionValidator> 
                                                                        <asp:RequiredFieldValidator ID="inputEmailRequiredValidator" Runat="server" Display="None" ControlToValidate="txtboxInputEmail" ErrorMessage="Please enter your email address" ValidationGroup="inputFormGroup" /> 
                                                                        <radI:radtextbox Width="200px" MaxLength="100" id="txtboxInputEmail" CssClass="textfield" runat="server" TextMode="SingleLine" EmptyMessage="Enter your email address"></radI:radtextbox> 
                                                                    </td> 
                                                                </tr> 
                                                                <tr> 
                                                                    <td colspan="2" class="Normal">  
                                                                        <asp:Label ID="lblComment" runat="server" Text="Comments:"></asp:Label> 
                                                                        <asp:RequiredFieldValidator ID="commentRequiredValidator" Runat="server" Display="None" ControlToValidate="txtboxInputComments" ErrorMessage="Please enter comments" ValidationGroup="inputFormGroup" /><br /> 
                                                                        <asp:TextBox ID="txtboxInputComments" runat="server" Columns="70" Rows="10" TextMode="MultiLine" CssClass="Normal"></asp:TextBox></td>  
                                                                </tr> 
                                                                <tr> 
                                                                    <td colspan="2" style="height: 18px">  
                                                                        <asp:LinkButton ID="lnkbtnSubmit" runat="server" CssClass="bluebtn" OnClick="lnkbtnSubmit_Click" ValidationGroup="inputFormGroup">Submit</asp:LinkButton> 
                                                                    </td> 
                                                                </tr> 
                                                            </table> 
                                                        </ContentTemplate> 
                                                    </asp:UpdatePanel> 
                                                </telerik:RadToolTip> 
                                            </td> 
                                        </tr> 
                                        </table> 
     
            <script type="text/javascript">  
            var closeTooltipFlag = false;  
            function PreventHide()  
            {  
             closeTooltipFlag = true;  
            }  
              
            function OnClientBeforeHide(sender, args)  
            {  
             //cancel the hide of the RadToolTip  
             args.set_cancel(closeTooltipFlag);  
            }  
              
            function CloseToolTip()  
            {  
             //once a comment has been posted, close the RadToolTip  
             closeTooltipFlag = false;  
             var tooltip = $find("<%= toolTipInputForm.ClientID %>");           
             tooltip.hide();                    
            }  
                              
            </script> 
     
        </div> 
        </form> 
    </body> 
    </html> 
     
  2. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 18 Jun 2007 Link to this post

    Hi Chris,
    I was not able to reproduce the problem, using your code. Could you please prepare and send us a simple project in a new support thread, demonstrating this behavior? Please make sure that you include the bin folder as well.

    All the best,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Chris
    Chris avatar
    171 posts
    Member since:
    Oct 2006

    Posted 18 Jun 2007 Link to this post

    Thanks for your support.  I realize it's the problem with System.Web.Extension.dll problem.  The version I am using and the dll has been placed to the file system c:/windows/assembly.  These made my page doesn't work accordingly.  I removed the dll from assembly and use the version 1.0.61025.61025 which now works.
Back to Top