所以我試着去辨別爲什麼叫我的控制器的某些方法獲得NULL第二個參數,這是我對我的CSHTML代碼:第二個參數得到NULL控制器上
$("#aceptarBorrar").click(function() {
debugger;
window.location.href = '@Url.Action("BajaServAsoc", "ServiciosAsoc")' + '?CodServ=' + codSerElim, + '?CodServAsoc=' + codSerAsElim;
});
在調試器中的這一點,我的變量都有值。
但在這一點上:
public ActionResult BajaServAsoc(string CodServ, string CodServAsoc)
{
try
{
string usuario = SessionHelpers.DatoPuente.UsuarioLegajo;
ServiciosAsocNegocio SerANeg = new ServiciosAsocNegocio();
SerAsociado ServA = new SerAsociado()
{
CodServ = CodServ,
CodServAsoc = CodServAsoc,
User = usuario
};
SerANeg.BajaServAsoc(ServA);
return View("Index");
}
的值丟失,我不知道爲什麼,我不知道在哪裏正在失去它的價值,爲什麼不兩者。
感謝大家,我當然會檢查kiziu網頁 – user3442470