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

Problem with Update Version telerik in RadMenu

4 Answers 153 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Daniel Botero Correa
Top achievements
Rank 1
Daniel Botero Correa asked on 21 Apr 2010, 12:54 PM
Hello,

I did an upgrade of the RadControls Telerik ASP.NET and I have a problem with the RadMenu.

when I do click in the menu's item, I get this error (Before it worked very good).

  
Sys.WebForms.PageRequestManagerServerErrorException: Specified cast is not valid. 
[Break on this error] Type.registerNamespace("Sys.WebForms")...UI._UpdateProgress",Sys.UI.Control);   


Error: image1.jpg

Thanks.
Daniel Botero Correa

4 Answers, 1 is accepted

Sort by
0
Dimitar Milushev
Telerik team
answered on 23 Apr 2010, 03:13 PM
Hello Daniel,

This seems to be a server error that occurs during an AJAX update. Can you please try attaching a debugger and seeing the stack trace of the exception? It would greatly help us in tracking down the problem.

Kind regards,
Dimitar Milushev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Daniel Botero Correa
Top achievements
Rank 1
answered on 27 Apr 2010, 02:34 PM

Hi Dimitar Milushev,

The error occurs in the " } finally {" and i cannot see the " catch() ", so I cannot get the stack trace of the exception or I don't know how to do it, can you explicate me?, the code is in one line and it's impossible to put a break point in this place.

I was be able to get this information:

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException:   
Specified cast is not valid. 

and seemingly it occurs in this code:

try{a._webRequest.completed(Sys.EventArgs.Empty)}finally{if(a._xmlHttpRequest!=null){a._xmlHttpRequest.onreadystatechange=Function.emptyMethod;a._xmlHttpRequest=null}}}}; 

I hope this information will be able to help you and you will be able to help me!!

Thanks,
Daniel Botero Correa
0
Daniel Botero Correa
Top achievements
Rank 1
answered on 29 Apr 2010, 01:08 PM
Hi Dimitar Milushev,

I removed the RadMenu's AJAX UPDATE CONTROL, and i got the stack trace of the exception, seemingly the RadMenu is not the problem, the problem is the RadSlider which is contained in the RadPageView which is associated with each RadMenuItem of the RadMenu.

The stack trace of the exception:

Erreur du serveur dans l'application '/WebSite'.  
--------------------------------------------------------------------------------  
 
Le cast spécifié n'est pas valide.   
Description : Une exception non gérée s'est produite au moment de l'exécution de la demande Web actuelle. Contrôlez la trace de la pile pour plus d'informations sur l'erreur et son origine dans le code.   
 
Détails de l'exception: System.InvalidCastException: Le cast spécifié n'est pas valide.  
 
Erreur source:   
 
Une exception non gérée s'est produite lors de l'exécution de la demande Web actuelle. Les informations relatives Ã  l'origine et l'emplacement de l'exception peuvent Ãªtre identifiées en utilisant la trace de la pile d'exception ci-dessous.    
 
Trace de la pile:   
 
 
[InvalidCastException: Le cast spécifié n'est pas valide.]  
   Telerik.Web.UI.RadSlider.LoadClientState(Dictionary`2 clientState) +118  
   Telerik.Web.UI.RadDataBoundControl.LoadPostData(String postDataKey, NameValueCollection postCollection) +193  
   Telerik.Web.UI.RadSlider.LoadPostData(String postDataKey, NameValueCollection postCollection) +121  
   Telerik.Web.UI.RadDataBoundControl.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +42  
   System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +693  
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1743  
 
   
 
 
--------------------------------------------------------------------------------  
Informations sur la version : Version Microsoft .NET Framework :2.0.50727.3603; Version ASP.NET :2.0.50727.3601  

I must commnet in the RadSlider's forum this error? or can you explain me, why it occurs?

The ASP code of the RadSlider is:

<telerik:RadPageView ID="RadPageView2" runat="server" Width="350px">  
                    <div><table>  
                        <tr> 
                            <td> 
                                <telerik:RadSlider ID="week" runat="server" AnimationDuration="400" 
                                Height="70px" ItemType="item" Width="350px" Value="8"></telerik:RadSlider> 
                             </td> 
                         </tr> 
                     </table></div>  
</telerik:RadPageView> 
 
<telerik:RadPageView ID="RadPageView1" runat="server" Width="350px">  
                        <table> 
                            <tr> 
                                 <td> 
                                    <telerik:RadSlider ID="month" runat="server" AnimationDuration="400"   
                                     Height="70px" ItemType="item" Width="350px" Value="3"></telerik:RadSlider> 
                                 </td> 
                             </tr> 
                         </table>                      
</telerik:RadPageView> 


And the C# code of the RadSlider is:

    private void initialize_month()  
    {  
        try 
        {  
            month.Items.Add(new RadSliderItem(managerClient.MonthLabel(DateTime.Now.AddMonths(-2).Month.ToString(), SourceFileClient), DateTime.Now.AddMonths(-2).ToString()));  
            month.Items.Add(new RadSliderItem(managerClient.MonthLabel(DateTime.Now.AddMonths(-1).Month.ToString(), SourceFileClient), DateTime.Now.AddMonths(-1).ToString()));  
            month.Items.Add(new RadSliderItem(managerClient.MonthLabel(DateTime.Now.Month.ToString(), SourceFileClient), DateTime.Now.ToString()));  
        }  
        catch (Exception ex)  
        {  
            //TODO ECRIRE LOG  
 
        }  
    }  
 
    public void initialize_week()  
    {  
        try 
        {  
            for (int i = 7; i >= 0; i--)  
            {  
                String value =  
                        DateTime.Now.AddDays((-7) * i).ToString();  
                RadSliderItem item = new RadSliderItem(  
                    DateTimeTreatment.GetWeekNumber(  
                        DateTime.Now.AddDays((-7) * i)).ToString(), value);  
 
                if (i == 0)  
                {  
                    //item.Selected = true;  
                }  
                week.Items.Add(item);  
                week.DataBind();  
            }  
        }  
        catch (Exception ex)  
        {  
            //TODO ECRIRE LOG  
        }  
    } 


In before version, it worked very good, but now, when I upgraded the Telerik ASP.NET's dll, it not works!!

Can you help me? I didn't find the problem in t he code.

Thanks.
Daniel Botero Correa
0
Daniel Botero Correa
Top achievements
Rank 1
answered on 29 Apr 2010, 02:11 PM
Hi Dimitar Milushev,

That's it... It works, I found the problem!!

The problem was in the RadSlider with ID week. I had put into tags Value = 8 and I generate only 7 RadsliderItem, in the before version there wasn't problem and that was permitted, but not seemingly in the last version (

assembly

 

="Telerik.Web.UI, Version=2010.1.309.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"

 

)

Cordially,
Daniel Botero Correa
Tags
Menu
Asked by
Daniel Botero Correa
Top achievements
Rank 1
Answers by
Dimitar Milushev
Telerik team
Daniel Botero Correa
Top achievements
Rank 1
Share this question
or