如何使用mvc5 jquery从区域控制器中查找根目录中的Controller操作 [英] How to find Controller action in root directory from areas controller using mvc5 jquery

查看:165
本文介绍了如何使用mvc5 jquery从区域控制器中查找根目录中的Controller操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从查找控制器文件夹中找到AssociateRecords方法,这些方法位于根目录中,但我正在搜索区域控制器中存在的另一个控制器。

问题是,如果我给出以下网址,它是从这些区域搜索的。





$ .ajax({

url: / LookUp / AssociateRecords,

dataType:text,

类型:'POST',

数据:args,

cache:false,

async:false,

成功:函数(数据){



},

错误:函数(d){

alert('错误');

}

} ;;

I'm trying to find the AssociateRecords method from Lookup controller folder these are in the root directory but i'm searching from Another controller which is present in the Areas controller.
Problem is if i give below url it is searching from the areas.


$.ajax({
url:"/LookUp/AssociateRecords",
dataType: "text",
type: 'POST',
data: args,
cache: false,
async: false,
success: function (data) {

},
error: function (d) {
alert('Error');
}
});

推荐答案

.ajax({

url:/ LookUp / AssociateRecords,

dataType :text,

类型:'POST ,

数据:args,

cache:false,

async:false,

成功:函数(数据) ){



},

错误:函数(d){

alert('错误');

}

});
.ajax({
url:"/LookUp/AssociateRecords",
dataType: "text",
type: 'POST',
data: args,
cache: false,
async: false,
success: function (data) {

},
error: function (d) {
alert('Error');
}
});


这篇关于如何使用mvc5 jquery从区域控制器中查找根目录中的Controller操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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