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

Wrapping the code block within RadCodeBlock does not resolve the error

5 Answers 1347 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 17 Dec 2008, 04:49 PM
Hi,

As soon as I drag a RadGrid onto my page, when loading the page I get the following error:

Please, see whether wrapping the code block, generating the exception, within RadCodeBlock resolves the error.

Exception details:
Error Message Please, see whether wrapping the code block, generating the exception, within RadCodeBlock resolves the error.
Error Source Telerik.Web.UI
Stack Trace at Telerik.Web.SkinRegistrar.RegisterCssReference(Page _page, Control _control, String _url) at Telerik.Web.SkinRegistrar.RegisterCssReferences(ISkinnableControl _control) at Telerik.Web.UI.RadCompositeDataBoundControl.RegisterCssReferences() at Telerik.Web.UI.RadCompositeDataBoundControl.OnPreRender(EventArgs e) at Telerik.Web.UI.RadGrid.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Target Site Void RegisterCssReference(System.Web.UI.Page, System.Web.UI.Control, System.String)

Wrapping the RadGrid into a radCodeBlock doesn't solve the problem. Only removing the RadGrid from the page gets everything back to normal.
Any idea?

Thanks,
John

5 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 17 Dec 2008, 05:15 PM
Hello John,

Could you please send us your project (aspx, cs/vb, web.config) attached to a formal support ticket?

Thank you for your cooperation.

Best regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
John
Top achievements
Rank 1
answered on 18 Dec 2008, 03:47 PM
Thank you very much for your answer.

It turned out that it was actually my fault: there was a code block (i.e. <% ... %>) on the Master Page that was causing the problem. However, the error was occurring only when the RadGrid control was defined on the page.

Thanks again,
J.
0
mohsin
Top achievements
Rank 1
answered on 14 May 2009, 03:37 AM

Hi,

 I am converting classic asp.net control to ASP.Net Ajax control. Here i have converted radgrid Successfully.
But in another control which was working fine now is not working after converting to ASP.net ajax controls. I am developing on DNN modules.

I am getting the error given below..

A critical error has occurred.
Please, see whether wrapping the code block, generating the exception, within RadCodeBlock resolves the error.


The page also has telerik:RadDatePicker.

Any help?


Thanks
---Mohsin
0
mohsin
Top achievements
Rank 1
answered on 14 May 2009, 04:01 AM
Hi,

I got the solution.

http://www.telerik.com/help/aspnet-ajax/ajxradscriptblockradcodeblock.html

Thanks




0
Houda
Top achievements
Rank 1
answered on 18 Sep 2012, 06:54 AM
Hi,
I had the same problem and as a solution I had just to put the javascript code inside
 <telerik:RadScriptBlock runat="server">.......</telerik:RadScriptBlock>.
Thanks Mohsin
Tags
Grid
Asked by
John
Top achievements
Rank 1
Answers by
Daniel
Telerik team
John
Top achievements
Rank 1
mohsin
Top achievements
Rank 1
Houda
Top achievements
Rank 1
Share this question
or