CssEmbedControl throws exception in 4.1

Posted by Community Admin on 04-Aug-2018 20:55

CssEmbedControl throws exception in 4.1

All Replies

Posted by Community Admin on 18-Apr-2011 00:00

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.

Posted by Community Admin on 20-Apr-2011 00:00

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

This thread is closed