Telerik
Home / Community / Forums / RadControls for ASP.NET: Panelbar / System.MethodAccessException with PanelBar

System.MethodAccessException with PanelBar

Feed from this thread
  • Etienne BONENFANT Intermediate avatar

    Posted on Jul 6, 2006 (permalink)

    Hello, this is my strange behavior :
    I'm using a PanelBar with templates. Inside a template, I'm using controls like radTabstrip for example.

    In code behind, I access to this radTabstrip like this :
    RadTabStrip1 = CType(RadPanelBar1.FindControl("RadTabStrip1"), RadTabStrip)
    in javascript, I must access to the control too and I'm using :
    var RadTabStrip1= <%= RadTabStrip1.ClientID %>;

    My code behind is executed normaly but after an error occurs for the javascript line. The error alert window mentions :
    An exception of type 'System.MethodAccessException' occurred in mscorlib.dll but was not handled in user code.
    Additional information: Attempt to access the method failed.

    If I try the javascript line :
    var PanelBar1= <%= RadPanelBar1.ClientID %>;
    it's ok. It's not ok before because controls are children of panelbar.

    Can you help me ? Thank you.

    Reply

  • Telerik Admin admin's avatar

    Posted on Jul 6, 2006 (permalink)

    Hello Etienne,

    Please find below your modified code snippet that works correctly.

    In code-behind:
    Public myTabstrip As RadTabStrip  
       
        Protected  Sub Page_Load(ByVal sender As ObjectByVal e As EventArgs)  
            myTabstrip = (CType((RadPanelbar1.FindControl("RadTabStrip1")), RadTabStrip))  
        End Sub 

    In your ASPX:
    <script type="text/javascript">  
            function ttID()  
            {  
                alert('<%= myTabstrip.ClientID %>');  
            }  
            </script> 


    Have a nice day,
    Paul
    the telerik team

    Reply

  • Etienne BONENFANT Intermediate avatar

    Posted on Jul 6, 2006 (permalink)

    It doesn't work better.
    I can say you more now, it was difficult before :
    In fact, my code was functional with dnn 4.0.3 and i get this error with dnn 4.3.2
    To understand, I isolated my code in an aspx page and I executed it as project start up page in two projects with differents versions (like this, I don't execute dnn code).
    The result is with dnn 403, it's ok and not with 432. So I suppose this error come from the project configuration. But I don't see what can be cause this problem...
    Have you got an idea please ?

    Reply

  • Etienne BONENFANT Intermediate avatar

    Posted on Jul 7, 2006 (permalink)

    I prepared a small project and opened a support ticket about this error that I do not solve.
    Hope you can help me. thank you.

    Reply

  • Telerik Admin admin's avatar

    Posted on Jul 10, 2006 (permalink)

     

    Hi Etienne,

    I just answered your support ticket on the topic. Here is the important part of my response:


    "I added your project to a DNN 4.3.2. installation and inserted the module in a new tab. Opening the tab did not cause any exceptions and showed what it was supposed to - a panelbar with a combobox inside.
    ...
    If you continue to experience the same problem, please provide the full text of the exception you get. It's also possible that the problem is caused by DNN as the 4.3.2 version is still a Release Candidate and issues do exist."

    Sincerely yours,

    Digibo
    the telerik team

    Reply

  • Etienne BONENFANT Intermediate avatar

    Posted on Jul 10, 2006 (permalink)

    It seems this error comes from DNN or my computer because the error doesn't appears at Telerik's.
    Sorry, and thank you for help.

    Reply

Powered by Sitefinity ASP.NET CMS

Contact Us | Site Feedback | Terms of Use | Privacy Policy
Copyright © 2002-2009 Telerik. All rights reserved.