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

RadComboBox in RadAjaxPanel exception on auto post back

13 Answers 188 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 13 Jul 2010, 10:51 PM
I've just upgraded to the latest internal build to see if this issue is fixed, but it is not. Anyways, in the official release of 2010.1 what was happening is that I had a RadComboBox set to auto post back embedded inside a RadAjaxPanel. When the combo box posted back, all menu selections would disappear except the one selected, no errors to say what was wrong. The rad script manager is in the master page. Anyways, I've applied the latest internal build hotfix to see if that fixes stuff and I still have the same problem, but I get the following java script exception (as reported by Chrome).

/Portal/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=radScriptManager_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bAjaxControlToolkit%2c+Version%3d4.1.40412.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen-US%3a315e40c1-4559-4b59-ba08-9c63c3f1ef4d%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2010.1.706.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3af0701647-7e8a-4d81-8815-8bfe442ffdc0%3a16e4e7cd%3af7645509%3a24ee1bba%3a19620875%3a874f8ea2%3a33108d14%3abd8f85e4%3aed16cbdc%3a1e771326%3aaa288e2d:3752Uncaught Error: SYNTAX_ERR: DOM Exception 12

13 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 14 Jul 2010, 01:36 PM
Hello Chris,

I was unable to reproduce this error with the latest version of Telerik.Web.UI and the following setup:
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
    <telerik:RadComboBox ID="RadComboBox1" runat="server" AutoPostBack="true">
        <Items>
            <telerik:RadComboBoxItem Text="!" />
            <telerik:RadComboBoxItem Text="2" />
            <telerik:RadComboBoxItem Text="3" />
            <telerik:RadComboBoxItem Text="$" />
        </Items>
    </telerik:RadComboBox>
</telerik:RadAjaxPanel>

Can you please let me know the version of the framework of the Telerik..Web.UI assembly and the Web Site in which you are testing?

Best wishes,
Simon
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Chris
Top achievements
Rank 1
answered on 15 Jul 2010, 03:43 PM
I can reproduce it doing what you are doing. I'm using 2010.1.706.40. Here's the basic code so you can see what I'm doing.

<%@ Page Title="" Language="C#" MasterPageFile="~/Includes/MasterPages/PortalMasterPage.master"
    AutoEventWireup="true" CodeFile="Applications.aspx.cs" Inherits="Organization_Admin_Applications" %>
 
<%@ Register TagPrefix="sparxent" TagName="UserPoolApplicationSubscriptions" Src="~/Organization/Controls/UserPoolApplicationSubscriptions.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PageTitle" runat="Server">
    Applications
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="Server">
    <telerik:RadAjaxPanel ID="rapAjaxPanel" runat="server">
        <table cellpadding="0" cellspacing="0">
            <tr>
                <td>
                    <b>Select UserPool:</b>
                </td>
                <td style="padding-left: .5em">
                    <%--<asp:DropDownList ID="ddlUserPools" runat="server" AutoPostBack="true" DataTextField="Description"
                        DataValueField="UserPoolID">
                    </asp:DropDownList>--%>
                    <telerik:RadComboBox ID="rcbUserPools" runat="server" AutoPostBack="true" DataTextField="Description"
                        DataValueField="UserPoolID">
                    </telerik:RadComboBox>
                </td>
            </tr>
        </table>
        <br />
        <sparxent:UserPoolApplicationSubscriptions ID="spxUserPoolApplications" runat="server"
            Mode="Edit" OnProvisioningError="OnProvisioningError" />
        <table width="100%">
            <tr>
                <td align="right">
                    <asp:Label ID="lblMessage" runat="server" ForeColor="Red" Text="Saved!" Visible="false"></asp:Label
                    <asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="OnSubmit" />
                </td>
            </tr>
        </table>
    </telerik:RadAjaxPanel>
</asp:Content>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
public partial class Organization_Admin_Applications : VirtualOfficePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //ddlUserPools.DataSource = Provisioner.GetUserPoolsByOrganizationID(UserClaims.CurrentUser.OrganizationID).OrderBy(up => up.Description);
            //ddlUserPools.DataBind();
            rcbUserPools.DataSource = Provisioner.GetUserPoolsByOrganizationID(UserClaims.CurrentUser.OrganizationID).OrderBy(up => up.Description);
            rcbUserPools.DataBind();
        }
 
        lblMessage.Visible = false;
    }
 
    protected void Page_PreRender(object sender, EventArgs e)
    {
        //if (ddlUserPools.Items.Count == 0)
        if (rcbUserPools.Items.Count == 0)
        {
            Response.Redirect("~/Organization/Admin/SignUp.aspx");
            return;
        }
        //spxUserPoolApplications.UserPoolID = Convert.ToInt64(ddlUserPools.SelectedValue);
        spxUserPoolApplications.UserPoolID = Convert.ToInt64(rcbUserPools.SelectedValue);
        spxUserPoolApplications.Activate();
    }
 
    protected void OnProvisioningError(object sender, ProvisioningControlEventArgs args)
    {
        VirtualOfficeMasterPage.DisplayError(args.Message);
    }
 
    protected void OnSubmit(object sender, EventArgs e)
    {
        if (spxUserPoolApplications.Submit())
            lblMessage.Visible = true;
    }
}

0
Chris
Top achievements
Rank 1
answered on 15 Jul 2010, 06:06 PM
I just upgraded to the new Q2 release and it is still exhibiting the same behavior.
0
Simon
Telerik team
answered on 19 Jul 2010, 01:45 PM
Hi Chris,

Thank you for the code.

I tried recreating the issue with the latest 4.0 official build of Telerik.Web.UI (Q2 2010) in a .NET 4.0 Web Site without success.

Please see the attached pages. Am I missing something?

All the best,
Simon
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Chris
Top achievements
Rank 1
answered on 19 Jul 2010, 04:24 PM
I'm also running this on Windows Server 2008 R2 x64 with the Url Rewriter V2 redirecting everything to HTTPS.

This is the rule I'm using:

<rewrite>
            <rules>
                <rule name="Redirect to HTTPS" stopProcessing="true">
                    <match url="(.*)" />
                    <conditions>
                        <add input="{HTTPS}" pattern="off" />
                    </conditions>
                    <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Found" />
                </rule>
            </rules>
        </rewrite>
0
Chris
Top achievements
Rank 1
answered on 20 Jul 2010, 03:20 PM
Here is what firebug returns for the error:

An invalid or illegal string was specified"  code: "12
https://fsweb.lost.dev.lab/Portal/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=radScriptManager_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bAjaxControlToolkit%2c+Version%3d4.1.40412.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen-US%3a315e40c1-4559-4b59-ba08-9c63c3f1ef4d%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2010.2.713.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a1814ab69-dbf3-46be-b5e4-1b4e7d85f183%3a16e4e7cd%3a874f8ea2%3af7645509%3a24ee1bba%3a19620875%3a490a9d4e%3abd8f85e4%3aed16cbdc%3a1e771326%3aaa288e2d
0
Chris
Top achievements
Rank 1
answered on 20 Jul 2010, 03:23 PM
Another interesting thing, that error only errors when I use the RadAjaxPanel. When I use the built-in asp.net update panel, it works just fine.
0
Chris
Top achievements
Rank 1
answered on 20 Jul 2010, 07:59 PM
I just downloaded the new Q2 release on my windows 7 machine and can reproduce the problem on my windows 7 iis as well.
0
Simon
Telerik team
answered on 22 Jul 2010, 05:09 PM
Hi Chris,

Please try disabling the URL rewriting to see whether it causes the error and let me know how it goes.

Greetings,
Simon
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Chris
Top achievements
Rank 1
answered on 22 Jul 2010, 10:43 PM
No go, the error still shows up.
0
Simon
Telerik team
answered on 23 Jul 2010, 04:50 PM
Hi Chris,

Thank you for the info.

So there is something else which is causing this error. I inspected the code where the error occurs and it happens when the styles in the <head> element are updated. Still, why is that is unclear to me yet.

Can you try modifying the page I sent you earlier or plug it in your web site to see if you can reproduce the error with it? If you manage, then please let me know what were the changes you made in order to trigger the issue.

Greetings,
Simon
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Chris
Top achievements
Rank 1
answered on 27 Jul 2010, 05:28 PM
Ok, I think I have narrowed down the culprit. I'm using an the ASP.NET menu control with a lot of styling:

<asp:Menu ID="mainMenu" runat="server" DataSourceID="smdsSiteMapDataSource" OnMenuItemDataBound="OnMenuItemDataBound"
    DynamicHorizontalOffset="10" Font-Names="Verdana" StaticSubMenuIndent=".25em" Orientation="Horizontal"
    Font-Size="1.15em">
    <DynamicHoverStyle ForeColor="#83BE24" />
    <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding=".5em" ForeColor="#FFFFFF" />
    <DynamicMenuStyle BackColor="#2D2D2D" ForeColor="#FFFFFF" BorderColor="#83BE24" BorderStyle="Solid"
        BorderWidth="1px" />
    <DynamicSelectedStyle ForeColor="#FFFFFF" />
    <StaticHoverStyle ForeColor="#83BE24" />
    <StaticMenuItemStyle HorizontalPadding="1em" VerticalPadding="2px" ForeColor="#FFFFFF" />
    <StaticSelectedStyle ForeColor="#FFFFFF" />
</asp:Menu>

When I commented out that control, the errors went away. The code that is being generated in the head is the following:

<head><title>
    Sparxent VirtualOffice
</title><link rel="shortcut icon" href="../../Images/favicon.ico"><link href="../../Styles/style.css" rel="stylesheet" type="text/css"><link href="../../Skins/CemaphoreBlack/Grid.CemaphoreBlack.css" rel="stylesheet" type="text/css"><link href="../../Skins/CemaphoreBlack/Window.CemaphoreBlack.css" rel="stylesheet" type="text/css"><link href="../../Skins/CemaphoreBlack/Filter.CemaphoreBlack.css" rel="stylesheet" type="text/css">
    <style type="text/css">
        .arrowlistmenu .openheader
        {
            /*CSS class to apply to expandable header when it's expanded*/
            background-image: url(images/level_1_active.jpg);
            color: #000000;
        }
    </style>
     
<style type="text/css">
    /* <![CDATA[ */
    #mainMenu img.icon { border-style:none;vertical-align:middle; }
    #mainMenu img.separator { border-style:none;display:block; }
    #mainMenu img.horizontal-separator { border-style:none;vertical-align:middle; }
    #mainMenu ul { list-style:none;margin:0;padding:0;width:auto; }
    #mainMenu ul.dynamic { background-color:#2D2D2D;border-color:#83BE24;border-width:1px;border-style:Solid;z-index:1;margin-left:10px; }
    #mainMenu a { font-family:Verdana;font-size:1.15em;text-decoration:none;white-space:nowrap;display:block; }
    #mainMenu a.static { padding:2px 1em 2px 1em;color:White;text-decoration:none; }
    #mainMenu a.popout { background-image:url("/Portal/WebResource.axd?d=pq1VbDJC9QkWAemefjEQHo_Q0MCMwCra9vMftKqYSFU1&t=634067469850665759");background-repeat:no-repeat;background-position:right center;padding-right:14px; }
    #mainMenu a.dynamic { padding:0.5em 5px 0.5em 5px;color:White;text-decoration:none; }
    #mainMenu a.static.selected { color:White;text-decoration:none; }
    #mainMenu a.dynamic.selected { color:White;text-decoration:none; }
    #mainMenu a.static.highlighted { color:#83BE24; }
    #mainMenu a.dynamic.highlighted { color:#83BE24; }
    /* ]]> */
</style><link href="/Portal/WebResource.axd?d=Le92BZukREKacZ43WizTtnEfDqqdROQkYZFSHVqjU1kNRcYN8TGcCok5orf7dM4G0&t=634148044492412053" type="text/css" rel="stylesheet" class="Telerik_stylesheet"><link href="/Portal/WebResource.axd?d=Le92BZukREKacZ43WizTtnEfDqqdROQkYZFSHVqjU1lBjQK8odQZrMUROWb2lDHdv5CCQwR4i3JhDTLiHKUqqw2&t=634148044492412053" type="text/css" rel="stylesheet" class="Telerik_stylesheet"><link href="/Portal/WebResource.axd?d=Le92BZukREKacZ43WizTtnEfDqqdROQkYZFSHVqjU1kvUJN0WiINHxoG4BqmYd0EhW0yjt3fVABOhxJS4ciL8MIjHaNWGmP5c_iWoFdCEFw1&t=634148044492412053" type="text/css" rel="stylesheet" class="Telerik_stylesheet"><link href="/Portal/WebResource.axd?d=Le92BZukREKacZ43WizTtnEfDqqdROQkYZFSHVqjU1mg47TFvNlEnT09y4nSGKYS0&t=634148044492412053" type="text/css" rel="stylesheet" class="Telerik_stylesheet"><script>window["_GOOG_TRANS_EXT_VER"] = "1";</script></head>

The #mainMenu stuff is being generated by the ASP.NET menu control and references a WebResource so I figured I might remove to see what happens. I'm not sure why there would be a conflict with postbacks on the rad combo box inside an ajax panel.
0
Simon
Telerik team
answered on 29 Jul 2010, 03:34 PM
Hi Chris,

I put this Menu declaration in the MasterPage I sent you earlier without being able to reproduce the issue.

Can you provide me with a live URL where I will be able to observe this? There is surely something, which I am missing.

Kind regards,
Simon
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ComboBox
Asked by
Chris
Top achievements
Rank 1
Answers by
Simon
Telerik team
Chris
Top achievements
Rank 1
Share this question
or