1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / CssEmbedControl throws exception in 4.1

CssEmbedControl throws exception in 4.1

2 posts, 0 answered
  1. Michael
    Michael avatar
    3 posts
    Registered:
    04 May 2009
    18 Apr 2011
    Link to this post
    Quick FYI in case anyone hits this.  When you use the CssEmbedControl in markup, it used to render if you omitted the MediaType property.  Since 4.1 it doesn't and you'll get:

    StartIndex cannot be less than zero.
    Parameter name: startIndex

    [ArgumentOutOfRangeException: StartIndex cannot be less than zero.
    Parameter name: startIndex]
       System.Text.StringBuilder.Remove(Int32 startIndex, Int32 length) +12613919
       Telerik.Sitefinity.Web.UI.PublicControls.CssEmbedControl.ConvertMediaTypeToString(MediaType mediaType) +430
    ...

    Just make sure you add MediaType="screen" and it'll be fine.
  2. Lubomir Velkov
    Lubomir Velkov avatar
    688 posts
    Registered:
    03 Nov 2014
    20 Apr 2011
    Link to this post
    Hi Michael,

    Thank you for reporting this issue. It has been fixed in our internal build that will be released next week. I have updated your points.

    Kind regards,
    Lubomir Velkov
    the Telerik team
2 posts, 0 answered