“Controller, Action, Model” not all code paths return a value

前端 未结 3 484
生来不讨喜
生来不讨喜 2021-01-28 12:45

I am really confused by this error "not all code paths return a value" on my action PostResponse. I have stared at my model, controller and view for hours and I think

3条回答
  •  情深已故
    2021-01-28 13:23

    Your PostResponse action, or method specifies an ActionResult as a return type, but does not actually return anything. You can resolve this by changing it from ActionResult to void

提交回复
热议问题