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

ModelState.IsValid - what must be assured for this to return true?

1 Answer 122 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Clay
Top achievements
Rank 1
Clay asked on 15 May 2013, 04:02 PM
I'm using Telerik reports in an asp.net MVC project.

A report I'm trying to generate is failing before it gets started, in the [HttpPost] ActionResult in the Controller; I reckon because "if 
(ModelState.IsValid)" is returning false.

I didn't know what IsValid was; on investigation, I see that it is defined in System.Web.Mvc.ModelStateDictionary

So what are the causes of a ModelStateDictionary being invalid? What should I examine or verify?

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 18 May 2013, 03:00 PM
Hello Clay,

The provided information is not enough to determine what causes the exception. Please check if you have covered the steps from the Telerik Reporting in MVC? Sure. It takes 8 quick steps. blog. You can compare your code with the examples provided in Using Telerik Web ReportViewer in ASP.NET MVC application.

If you need further help, please share the full stack trace, your controller code and the aspx page markup.

All the best,
Stef
the Telerik team

Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

Tags
General Discussions
Asked by
Clay
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or