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

[Solved] Is client validation possible on "load on demand" tab?

1 Answer 106 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ed
Top achievements
Rank 1
Ed asked on 06 Apr 2011, 08:06 AM
I have a tab control. It loads its tabs using load on demand feature. It works great. I load a partial view. Inside the view is an Ajax.BeginForm( ...

I have all the included js files
<script type="text/javascript" src="/public/js/jquery/jquery.unobtrusive-ajax.min.js"></script>
<script type="text/javascript" src="/public/js/jquery/jquery.validate.min.js"></script>
<script type="text/javascript" src="/public/js/jquery/jquery.validate.unobtrusive.min.js"></script>

and in web.config, settings are correct
  <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" /> In all other areas of my site, client validation works great. However, I noticed when I load an ajax form inside a tab using the load on demand feature, the client side validation doesn't fire. Interestingly, on the server, the ModelState.isValid is false and there are errors. Question is why are the not getting caught on the client? Does load on demand support client side validation inside an ajax form on a tab? And my second question is how to embed a form on the first tab that comes up within the fluent markup. I continually get compile time errors. Is there sample code show how to embed a form inside a tab using razor syntax? Many Thanks,

1 Answer, 1 is accepted

Sort by
0
Trupti
Top achievements
Rank 1
answered on 01 Jun 2011, 07:28 PM
Hello Ed,

I have same problem.I am struggling to get client side validation for a tab that loads with LoadOnDemand feature.Is your problem solved?I am working on MVC2,do you think MVC3 has fix for this?

Thanks
Tags
TabStrip
Asked by
Ed
Top achievements
Rank 1
Answers by
Trupti
Top achievements
Rank 1
Share this question
or