[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 281
  • Last Modified:

Json and MVC

Hi,

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?

Thanks
0
Soluga
Asked:
Soluga
  • 2
  • 2
1 Solution
 
guru_samiCommented:
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.
0
 
SolugaAuthor Commented:
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.
0
 
guru_samiCommented:
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.
0
 
SolugaAuthor Commented:
Many Thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now