0
[Remote("DropDownSelected", "Patient")]
public Guid SexIdentifier { get; set; }



public ActionResult DropDownSelected(object value)
{
    var x = ((Guid)value).ToString();
    string xsd = value.ToString();
    var abc = ControllerContext.Controller;

    if (value == null)
    {
        //value = string.Empty;
    }

    if (value.ToString() == Convert.ToString(Guid.Empty) || value.ToString() == string.Empty)
    {
        return Json(String.Format("0 does not exist."), JsonRequestBehavior.AllowGet);
    }

    return Json(true, JsonRequestBehavior.AllowGet);
}
Ihor Kaharlichenko
  • 5,944
  • 1
  • 26
  • 32

1 Answers1

0

If your property is called SexIdentifier then your action must use the same name for its argument:

public ActionResult DropDownSelected(Guid sexIdentifier) 
{
    ...
}

Also if you have a default value of the dropdown you could use a nullable Guid:

public ActionResult DropDownSelected(Guid? sexIdentifier) 
{
    ...
}
Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928