参数在调用时变为null但正确传递 [英] parameter became null at calling but passing correctly

查看:72
本文介绍了参数在调用时变为null但正确传递的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的函数我传递 DbgId 作为参数此处的值正确但在函数调用中它变为空。

This is My function i am Passing DbgId as a Parameter here value is going correctly but in function call it's becoming null.

$.ajax({
    type: "GET",
    url: "/Roles/DeleteDeptByGroup",
    data: { DbgId: DbgId, departments: JSON.stringify(departments) },
    async: true,
    cache: false,
    datatype: "json",
    success: function (msg) {
        if (msg == true) {
            $("select option:selected").each(function () {
                $(this).remove();
            });




public JsonResult DeleteDeptByGroup(string DbgId, string departments)
{
}



任何人都可以帮助我吗?


Can any one help me?

推荐答案

.ajax({
type: 获取
url: / Roles / DeleteDeptByGroup
data:{ DbgId:DbgId ,departments: JSON .stringify(departments)},
async: true
cache: false
数据类型: json
成功: function (msg){
if (msg == true ){
.ajax({ type: "GET", url: "/Roles/DeleteDeptByGroup", data: { DbgId: DbgId, departments: JSON.stringify(departments) }, async: true, cache: false, datatype: "json", success: function (msg) { if (msg == true) {


选择选项:选择)。each( function (){
("select option:selected").each(function () {


)除去();
});
(this).remove(); });




public JsonResult DeleteDeptByGroup(string DbgId, string departments)
{
}



任何人都可以帮助我吗?


Can any one help me?


这篇关于参数在调用时变为null但正确传递的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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