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 6980841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:04:44+00:00 2026-05-27T18:04:44+00:00

I need to take GET fields from my asp.net web app (first name and

  • 0

I need to take GET fields from my asp.net web app (first name and last name). It needs to send that data from frontend(asp.net web app) using JSON to MVC 3 app. MVC 3 App would communicate with database, retrieve values and should serialize them into json object and POST to the front end(ASP.NET web app). Can anyone explain with a sample code how I would accomplish 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-05-27T18:04:45+00:00Added an answer on May 27, 2026 at 6:04 pm

    You could use the WebClient class. It allows you to send HTTP requests to any web application. As far as the JSON part is concerned you will need a JSON serializer. You could use the built-in JavaScriptSerializer class or a third party such as Json.NET.

    So let’s suppose that you have the following controller action in your ASP.NET MVC 3 application that you want to invoke:

    [HttpPost]
    public ActionResult Foo(Bar bar)
    {
        ...
        return Json(new 
        {
            status = "OK"
        });
    }
    

    where the Bar class contains some properties (could be simple or complex types):

    public class Bar
    {
        public string FirstName { get; set; }
        public string LastName { get; set; }
    }
    

    Now you could invoke it like this from the client side:

    using (var client = new WebClient())
    {
        client.Headers[HttpRequestHeader.ContentType] = "application/json";
        var serializer = new JavaScriptSerializer();
        var json = serializer.Serialize(new 
        {
            firstName = "first",
            lastName = "last"
        });
        var resultJson = client.UploadString("http://example.com/foo", json);
        var result = serializer.Deserialize<Result>(resultJson);
    }
    

    where you would define the Result class to match the JSON structure returned by the application:

    public class Result
    {
        public string Status { get; set; }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to take a web page and extract the address information from the
I need to take a paragraph of text and extract from it a list
I need to take a BufferedImage and convert it to YCbCr format so that
i need to take some row. They came from sql TARIH (sql column) is
Judging from the result of my last inquiry , I need to calculate and
I have developed an app that allows the user to fill out text fields
I am struggling with a nullable datetime column [DateInsp] in an ASP.NET app which
I am new to programming so i figured i'd get help from those that
How would I get my JSON string to my asp.net using jquery I am
I have a GridView. At event _RowDataBound I need take the underlying value from

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.