[Solved] ASP.Net Error: Cannot implicitly convert type System.DateTime? to int

Last Reply 7 months ago By dharmendr

Posted 7 months ago

Hi,

I have one stored procudure

CREATE PROCEDURE [dbo].[PayProcess] 
    -- Add the parameters for the stored procedure here
    (@Date Date)
AS
BEGIN
    SELECT 'Procedure Run sucessfully' As 'Procedure'
END
GO

Currently my requirement is that whar ever data i have selected need to display it on grid view

in controller i am getting error 

cannot convert from 'System.DateTime?' to 'int?'

[HttpPost]
public JsonResult getAll1(DateTime? Id5)
{
    var result = db.PayProcess(Id5).ToList();
    var JsonResult = Json(result, JsonRequestBehavior.AllowGet);
    JsonResult.MaxJsonLength = int.MaxValue;
    return JsonResult;
}

Could you please kindly help me

This question does not have replies that have been liked.