在MVC3中使用Jquery + Ajax在视图中呈现局部视图 [英] Rendering a Partial View in a View Using Jquery+Ajax in MVC3

查看:113
本文介绍了在MVC3中使用Jquery + Ajax在视图中呈现局部视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hellow everyone ..



这是sohaib在这里,我在拉合尔巴基斯坦工作的asp.net开发人员。

我我正在为我的公司建议的项目工作,所以我现在正在使用Jquery,Ajax,Mvc3,实体框架。



我有一个FindStudentDetails视图,当用户点击它时我会有一个按钮AddStudent,然后它会将用户重定向到AddNewStudent形式这是局部视图。我在该视图中呈现了局部视图,并且内容被替换,但是这里出现了一个小问题。部分视图的控件在FindStudentPage上没有运行(基诺UI控件)

但是当我渲染实际视图而不是部分视图时控件开始工作..





请建议我一个解决方案,因为我必须继续...

Hellow everyone..

this is sohaib ameen here and I am working an asp.net developer in lahore pakistan.
I am working on a project my company advised me to so I am using Jquery, Ajax, Mvc3 , entity framework now a days for it.

I got a View of "FindStudentDetails" on which I have a button "AddStudent" when user will click on it then it will redirect the user to "AddNewStudent" form which is a partial View. I have rendered partial view in that view and contents are replaced but a little problem arises here. Controls of partial view does not run (Keno UI Controls)
on FindStudentPage but when I rendered the actual view not the partial one then controls starts working ..


Please suggest me a solution because I have to move on ...

推荐答案

当你使用Kendo控件时在局部视图中,您可能需要在顶部添加以下代码



As you are using Kendo controls in your partial view, you may need to add following code at the top of that

@using Kendo.Mvc.UI;
@using Kendo.Mvc.Extensions;


这篇关于在MVC3中使用Jquery + Ajax在视图中呈现局部视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆