500 error when selecting an item

4 posts, 1 answers
  1. Mike Dennis
    Mike Dennis avatar
    51 posts
    Member since:
    Mar 2006

    Posted 11 Aug 2011 Link to this post

    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?
  2. Kalina
    Admin
    Kalina avatar
    918 posts

    Posted 17 Aug 2011 Link to this post

    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.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mike Dennis
    Mike Dennis avatar
    51 posts
    Member since:
    Mar 2006

    Posted 17 Aug 2011 Link to this post

    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
  5. Answer
    Kalina
    Admin
    Kalina avatar
    918 posts

    Posted 17 Aug 2011 Link to this post

    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.

Back to Top