public JsonResult GetScore(int StudentID = 0)
{
//fetch the score for the user
//--Call sendReport
//return the score to the calling method
}
public void SendReport(int StudentID = 0)
{
//Logic to get the detaied marks and prepare the report's PDF
//Mail the generated PDF back to student
}
In my web application, while Student clicks for score student will get his/her score on screen and will get detailed report’s PDF mailed to his/her registered mail.
Now problem is I would like to run SendReport in background, so student will come to know his/her score immediately without waiting.
I’ve gone through this question but it gives me error of invalid argument.
you could just call it in a new thread