I am trying to send through multiple parameters through the Url.Action.
$('#dialog').dialog({
autoOpen: false,
width: 850,
height: 420,
resizable: false,
title: 'Vehicle details',
modal: true,
open: function (event, ui) {
$(this).load("@Url.Action("LightStoneRequest", new { registrationNumber = Model.VehicleRegistration, vinNumber = Model.vVinNumber })");
},
buttons: {
"Close": function () {
$(this).dialog("close");
}
}
});
During run time it looks as follows:
$(this).load("/APQuotes/LightStoneRequest?registrationNumber=TE5TGP&vinNumber=VINTEST44889856");
As you can see there is a vin number passed through, but its a null in my controller.
Here is my modal.
public partial class LightStoneRequest
{
public LightStoneRequest()
{
this.LightStoneDataFields = new HashSet<LightStoneDataField>();
}
public int LightStoneRequestId { get; set; }
public string RegistrationNumber { get; set; }
public string VinNumber { get; set; }
public virtual ICollection<LightStoneDataField> LightStoneDataFields { get; set; }
}
if i remove the amp; it works, but the URL.Action adds the amp;.