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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:14:10+00:00 2026-05-28T01:14:10+00:00

I am confused with AjaxOption in MVC3 , i would like to make post

  • 0

I am confused with AjaxOption in MVC3 , i would like to make post request but it’s always make get request and redirects to new url.

my .cshtml code as per below

<div >  

     @Html.ActionLink("Check Availability", "ValidateUsername", "Wizard",  new { username = "arun"},
                            new AjaxOptions()
                                {
                                    Url="/Wizard/ValidateUserName",
                                    UpdateTargetId = "msg",
                                    HttpMethod = "POST",
                                    LoadingElementId = "progress"

                                })
    </div>
    <div id="progress">
        <img alt="" src="../../Content/Images/progress.gif" width="20px" height="20px" style="display: none" />
    </div>
    <div id="msg">
    </div> 

and controller action as per below

public ActionResult ValidateUsername(string username)
        {
            Thread.Sleep(200);
            //return Json(!username.ToLower().Equals("arun"));
            return Json(true , JsonRequestBehavior.AllowGet);
        }

it’s always make get request instead of POST request and redirect to new URL http://localhost:55152/Wizard/ValidateUsername?username=arun , why?

and HTML code generated as per below

<div >

            <a Confirm="" HttpMethod="POST" InsertionMode="Replace" LoadingElementDuration="0" LoadingElementId="progress" OnBegin="" OnComplete="" OnFailure="" OnSuccess="" UpdateTargetId="msg" Url="/Wizard/ValidateUserName" href="/Wizard/ValidateUsername?username=arun">Check Availability</a>
        </div>
        <div id="progress">
            <img alt="" src="../../Content/Images/progress.gif" width="20px" height="20px" style="display: none" />
        </div>

        <div id="msg">
        </div>
  • 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-28T01:14:11+00:00Added an answer on May 28, 2026 at 1:14 am

    You need to use @Ajax.ActionLink instead of @Html.ActionLink to post data by ajax

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

confused - given a track uri, I can get one album but possibly more
Bit confused here, I have an on-demand instance but do I get charged even
Very confused and have probably overlooked something, but some ideas would be appreciated! I
Confused here... I have two dates which I NSLog to console and get: dates
Confused and might be missing something simple.. I've got var q = new Queue<object>();
Getting confused by syntax here, but what is the difference between: foo[x][y] and foo[x,
Confused with the problem here. New to C, as made obvious by the below
Im confused, I passed a matrix datatype into the this.graphics.beginBitmapFill(); and i get Implicit
Confused regarding best methodology to make website usable and consistent across all devices -
I'm a bit confused as to how to get two method to call each

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.