Click here to Skip to main content
12,889,437 members (48,670 online)
Rate this:
Please Sign up or sign in to vote.
See more: MVC

I would like to create an MVC application with HttpGet and HttpPost methods using jquery
Pls help me

Thanks & Regards,
Posted 8-Oct-12 23:28pm
vyas_pratik20 9-Oct-12 5:34am
be clear MVC is .net MVC ?
you want to create or call the action from jquery
soumyaraj 9-Oct-12 5:56am
yes .net MVC

I want to call the action from jquery

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Use something like:

            type: "POST",
            url: url,
            contentType: 'application/json; charset=utf-8',
            data: postData,
            dataType: "json",
            success: function (result) {
                if (redirectOnError("json", result)) {
            error: errorHandler

URL s'd be the form of "http://baseurl/controller/action". So make sure you have both defined.

For 'Get' request just change
type: "GET"
And also you have to pass parameters attached in query string.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170424.1 | Last Updated 9 Oct 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100