如何在mvc中的对话框中显示视图 [英] How to show a view in dialog box in mvc

查看:57
本文介绍了如何在mvc中的对话框中显示视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我是MVC新手,我想在点击按钮的对话框中显示一个名为Filters的视图,其中有两个下拉菜单。我该怎么做?我将感谢你的帮助。



Usama

解决方案

在这种情况下你必须使用Kendo对话框...... !!!



首先使用以下代码创建一个对话框:



< pre lang =cs> var win =


#window)。kendoWindow({
actions:[ 关闭],
draggable: false
height: 180px
modal: true
title : 分配新密码
visible: false
width: 350px
})。data( kendoWindow );
win.center();
win.open();


#txtPassword )。val(' ');
}







创建

设计你的下拉列表





这是绑定下拉的方式:



将您的下拉值保存在ViewBag中,如下所示:



  var  operatorData = '  @ ViewBag.Operators'; 
operatorData = replaceQuotes(operatorData);
var objJSON =


Hi,
I am new to MVC, I want to show a view named as Filters in a dialog box on button click, in which there are two dropdowns.How can i do this? I shall be thankful for your help.

Usama

解决方案

In that case you have to use Kendo Dialog Box...!!!

First Create a Dialog Box using Below Code:

var win =


("#window").kendoWindow({ actions: ["Close"], draggable: false, height: "180px", modal: true, title: "Assign New Password", visible: false, width: "350px" }).data("kendoWindow"); win.center(); win.open();


("#txtPassword").val(''); }




Create

design your dropdown here



this is way of binding drop down:

keep your dropdown value in ViewBag like below:

var operatorData = '@ViewBag.Operators';
    operatorData = replaceQuotes(operatorData);
    var objJSON =


这篇关于如何在mvc中的对话框中显示视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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