InvalidOperationException was unhandled by user code. Eval failed.

InvalidOperationException was unhandled by user code. Eval failed.

Old forum URL: forums.lhotka.net/forums/t/8850.aspx


stevehi2u posted on Wednesday, April 28, 2010

I am getting this error when trying to run sample project NavigationSample.

InvalidOperationException was unhandled by user code.
Eval failed.

Line: 1
Error: 'Sys' is undefined

string initScript = @"
var __navigateHandler = new Function('obj','args','document.getElementById(\'Xaml1\').Content.Navigator.HandleNavigate(args.get_state())');
Sys.Application.add_navigate(__navigateHandler);
__navigateHandler(this, new Sys.HistoryEventArgs(Sys.Application._state));".
Replace("Xaml1", silverlightControlNameInWebPage);

HTMLPage.Window.Eval(initScript);

ajj3085 replied on Wednesday, April 28, 2010

Sounds like some Asp.net javascript files aren't being included.

sergeyb replied on Wednesday, April 28, 2010

Also, SL 3 has its own navigation framework which is more robust than CSLA one that was built in SL 2.0 to accommodate SL missing functionality.  The error may also be caused by incorrect start up project/page.  In any case, you should definitely look into SL 3 navigation framework.

omegaluz replied on Thursday, November 03, 2011

I get the same problem when running the InventoryDemo from the CSLA 4.2 samples.  Has there been any resolution to this problem?  I am able to run other samples without problems.

Copyright (c) Marimer LLC