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

500 error when selecting an item

3 Answers 67 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Mike Dennis
Top achievements
Rank 1
Mike Dennis asked on 11 Aug 2011, 04:58 PM
I have a RadComboBox that is populated on demand with a web service with items based off what the user types.  It works fine with a basic string as the text value when I add a RadComboBoxItemData object to the array that I pass back with the web service.  I would like to have a template format when the RadComboBox is opened though.  For example, a name with a formatted address that is a different color than the title and someone dynamically formatted based on what fields exist for each record.  I didn't see an example, so I tried to generate a few HTML tags to handle that.  It displays fine when expanded, although it has the tags for the textbox area.  It would be nice if I could just have the name in the textbox, but the name and formatted address when the RadComboBox is open.  When I select one of the items I get a server 500 error.  In the event viewer, it states that "A potentially dangerous Request.Form value was detected from the client ".  Is there some other way that I should be doing this?  Is the functionality I am looking for even possible right now with the RadComboBox?

3 Answers, 1 is accepted

Sort by
0
Kalina
Telerik team
answered on 17 Aug 2011, 03:19 PM
Hello Mike Dennis,

- I am afraid that RadComboBox Templates are not supported when you use Load On Demand via WebService - that is why we do not have an example for this.
Let me explain you how Templates work - Templated Items' HTML is built at the server before it is finally rendered. This is required because the Template definition is available only at the server and Items are built using this definition.

- The reason for the error that you receive is the Request Validation that ASP.NET performs.
Request Validation, is a feature of ASP.NET that prevents the server from accepting content containing un-encoded HTML. This feature is designed to help prevent some script-injection attacks. It is strongly recommended to HTML-Encode all input data. Please take a look at this article.

Best wishes,
Kalina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Mike Dennis
Top achievements
Rank 1
answered on 17 Aug 2011, 03:38 PM
Kalina,

So is there any supported way of using templates and not loading the whole list?  I was using the web service because there are about 16,000 possible items, and I was just pulling the 10 or so closest to what the user types.

Mike
0
Accepted
Kalina
Telerik team
answered on 17 Aug 2011, 04:30 PM
Hello Mike Dennis,

You can use RadComboBox with a Server-Side Load On Demand and Templates.
Please take a look at the first RadComboBox(“Product”) in this online demo.

All the best,
Kalina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
ComboBox
Asked by
Mike Dennis
Top achievements
Rank 1
Answers by
Kalina
Telerik team
Mike Dennis
Top achievements
Rank 1
Share this question
or