error whil loading file with roundedcornersextender...

Last post 09-11-2007 4:05 AM by Jin-Yu Yin - MSFT. 4 replies.

Sort Posts:

  • error whil loading file with roundedcornersextender...

    09-06-2007, 5:40 PM
    • Member
      29 point Member
    • algarrobo
    • Member since 08-24-2007, 3:39 PM
    • Argentina
    • Posts 14

     

     

    Each time I add a roundedcorners extender to my site, the page will not load correctly and throws this error while trying to load the webform:

    "htmlfile: Unexpected call to method or property access."

    and breaks execution at this line:

    e.insertBefore(newDiv, lastDiv)

    in file:

    mywebservername/myrootwebfolder/ScriptResource.axd

     

    Anyone knows what this is all about?

     

    Signature goes here
  • Re: error whil loading file with roundedcornersextender...

    09-08-2007, 9:21 PM
    • Member
      2 point Member
    • teknlgy
    • Member since 09-09-2007, 1:05 AM
    • Posts 1

    I am seeing this error as well when trying to use the rounder corners with textbox.

    I am able to use the rounded corners with the panel control.

    I see this error first when trying to run it with the textbox.

    htmlfile: Unexpected call to method or property access.

    Then it allows the page to break on the line of offending code:

    $create(AjaxControlToolkit.RoundedCornersBehavior, {"id":"RoundedCornersExtender2"}, null, null, $get("TextBox1"));

    Has anyone else had this error?

  • Re: error whil loading file with roundedcornersextender...

    09-09-2007, 2:55 PM
    Answer
    • Contributor
      4,792 point Contributor
    • KaziManzurRashid
    • Member since 03-09-2003, 3:04 PM
    • Dhaka, Bangladesh
    • Posts 882

    You cannot apply it for input elements such as TextBox, Button, Select. as the Extender tries to put few div as the child..

    Long Live .NET
    Kazi Manzur Rashid (Amit)
    _________________________
    Web: http //dotnetshoutout.com
    Blog: http://weblogs.asp.net/rashid
    Twitter: http://twitter.com/manzurrashid
  • Re: error whil loading file with roundedcornersextender...

    09-10-2007, 9:07 AM
    • Member
      29 point Member
    • algarrobo
    • Member since 08-24-2007, 3:39 PM
    • Argentina
    • Posts 14

    I'll have to add that I'm not  using it with a TextBox, but with a Button Control... is the answer also true for this case?

     

    Signature goes here
  • Re: error whil loading file with roundedcornersextender...

    09-11-2007, 4:05 AM
    Answer

    Hi,

    I have tested the following code:

    <%@ Page Language="C#" %>

    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <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">
                </asp:ScriptManager>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <cc1:TabContainer ID="TabContainer1" runat="server" Height="200">
                            <cc1:TabPanel ID="TabPanel1" runat="server">
                                <HeaderTemplate>
                                    Tab 1 Header</HeaderTemplate>
                                <ContentTemplate>
                                    <asp:Button ID="Button1" runat="server" Text="Button" />
                                </ContentTemplate>
                            </cc1:TabPanel>
                            <cc1:TabPanel ID="TabPanel2" runat="server">
                                <HeaderTemplate>
                                    Tab 2 Header</HeaderTemplate>
                                <ContentTemplate>
                                    <asp:Button ID="Button2" runat="server" Text="Button" />
                                </ContentTemplate>
                            </cc1:TabPanel>
                        </cc1:TabContainer>
                        <asp:Panel ID="Panel1" runat="server" Height="50px" Width="125px">
                            <asp:Button ID="Button3" runat="server" Text="Button" />
                            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                        </asp:Panel>
                        <%--<cc1:RoundedCornersExtender ID="RoundedCornersExtender1" runat="server" TargetControlID="Button3" Radius="6" Corners="All">       throw the error--%>
                        <%--<cc1:RoundedCornersExtender ID="RoundedCornersExtender1" runat="server" TargetControlID="TextBox1" Radius="6" Corners="All">      throw the error--%>
                        <cc1:RoundedCornersExtender ID="RoundedCornersExtender1" runat="server" TargetControlID="Panel1" Radius="6" Corners="All"><%--don't throw the error--%>
                        </cc1:RoundedCornersExtender>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </div>
        </form>
    </body>
    </html>

    So the TargetControl of RoundedCornersExtender cann't be textbox or button.

    Best Regards

    Sincerely,
    Jin-Yu Yin
    Microsoft Online Community Support
Page 1 of 1 (5 items)