Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8365167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:35:47+00:00 2026-06-09T12:35:47+00:00

Really having trouble trying to implement this in my controller. Essentially as it stands

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T12:35:48+00:00Added an answer on June 9, 2026 at 12:35 pm

    Try this. New code is added between two comment line. You can also consult this url for details, if it’s a POST you might have to pass some form data, it’s all described in the link above.:

    <HttpPost()>
        Function Create(job As Job) As ActionResult
            If ModelState.IsValid Then
                db.Jobs.Add(job)
                db.SaveChanges()
                'Sending SMS here: (start)
                Dim request as WebRequest = WebRequest.Create("http://go.bulksms.com:1557/send?username=fred&message=hello")
                request.Method = "POST"
                Dim response As WebResponse = request.GetResponse()
    
                'end
                Dim url As String = "/RequestedService/AddService/" + job.JobId.ToString()
                Return Redirect(url)
            End If
    
            Return View(job)
        End Function
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I been having trouble trying to figure this out. When I think I have
I am really having trouble trying to figure out how to find certain records
I've read hundreds of explanations on this in java and I'm really having trouble
I'm really new to programming, so I'm having trouble explaining this -- please forgive.
Probably something really simple, but I'm having some real trouble with it. I have
This question is pretty generic actually, but I'm really having trouble finding a good
Just trying to implement mobFox into my app, but having trouble to make it
I am having trouble with a really simple problem. I'm trying to remove line
I'm trying to display some cards into a QListView but I'm really having trouble
This is probably really easy, but I am having trouble with it. I asked

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.