Really having trouble trying to implement this in my controller. Essentially as it stands I have a controller than when it completes passes the user to a URL as below:
<HttpPost()>
Function Create(job As Job) As ActionResult
If ModelState.IsValid Then
db.Jobs.Add(job)
db.SaveChanges()
Dim url As String = "/RequestedService/AddService/" + job.JobId.ToString()
Return Redirect(url)
End If
Return View(job)
End Function
However I am trying to implement the functionality to send an SMS each time this controller is called and have got this working with a URL like (made up without username or password): http://go.bulksms.com:1557/send?username=fred&message=hello This needs to be accessed via an HTTP post request. I understand I can return this URL in the 'Return Redirect' above but I want both to happen (the redirect and the post on this link sending the SMS) and ideally I want the user to be redirected to the page as it happens now but the SMS to be sent in the background. How would I implement this?