Json and MVC

Posted on 2014-08-19
Last Modified: 2014-08-26

I am trying to move over from web forms to MVC.
I have always used Json to post data to the server.

Should I continue to use Json or are people moving over to the controllers only to post data?

Question by:Soluga
    LVL 41

    Expert Comment

    The question is bit unclear. Can you elaborate more on your issue.

    When you say post json, I take you are making an ajax call to some webservice correct? You can continue using that or now you have WebAPI as an option as well.
    LVL 1

    Author Comment

    Yes, I have used ajax calls to a WebMethod on the code behind in web forms.

    I guess I am just wondering whether to pursue that design pattern as it is such an efficient method in moving data around.
    LVL 41

    Accepted Solution

    Yes, if you are making ajax calls to WebMethods, then in that case your WebMethods in WebForms will translate to ActionMethod in MVC Controller. And your ajax path to WebMethod will be replaced by your controller/action route.
    LVL 1

    Author Closing Comment

    Many Thanks

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Suggested Solutions

    Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
    For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK ( for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now