Hi,
I'm evaluating Telerik RadControls in a web application. On a RadComboBox change I display another third party control (Aspose.Form) that show my InfoPath forms. I need to view them and on Save button on my page, I want to save that form. However I'm just stuck just getting it loaded on dropdown change event. I get this message:
"Error: Sys.WebForms.PageRequestManagerServerErrorException: Multiple controls with the same ID 'x0' were found. FindControl requires that controls have unique IDs" as shown in the attachment.
My usage of controls in .aspx is:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadComboBox1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="XmlFormView1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadComboBox ID="RadComboBox1" runat="server"
AutoPostBack="true"
onselectedindexchanged="RadComboBox1_SelectedIndexChanged"
Label="Please select a form:" Width="200px">
<Items>
<telerik:RadComboBoxItem Text="" Value="" />
<telerik:RadComboBoxItem Text="AST Monthly Inspection Checklist" Value="1" />
<telerik:RadComboBoxItem Text="Book1PMIQAL CHECKLIST" Value="2" />
</Items>
</telerik:RadComboBox>
And in codebehind, I have:
protected void RadComboBox1_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
{
//Getting error on DDL change:
//Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Multiple controls with the same ID 'x0' were found. FindControl requires that controls have unique IDs.
try
{
XmlFormView1.Controls.Clear();
XmlFormView1.Reset();
if (int.Parse(RadComboBox1.SelectedItem.Value) > 0)
{
XmlFormView1.XsnLocation = Server.MapPath("Forms/" + RadComboBox1.SelectedItem.Text + ".xsn");
XmlFormView1.XmlDataString = GetFormDataByID(int.Parse(RadComboBox1.SelectedItem.Value));
}
XmlFormView1.RefreshData();
}
catch (Exception)
{
throw;
}
}
Sample project can be sent on request so that you can reproduce it.
Thank you,
Parvinder