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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:06:36+00:00 2026-05-31T15:06:36+00:00

I have an ajax form created with the html helper: @using (Ajax.BeginForm(…)) The problem

  • 0

I have an ajax form created with the html helper: @using (Ajax.BeginForm(...))

The problem is when I post some characters like ñ, €, etc they are encoded as ñ -> ñ, €-> ⬠when they are received by the controller.

I already have this section in my Web.config:

<globalization enableClientBasedCulture="true" uiCulture="auto" culture="auto" fileEncoding="iso-8859-15" requestEncoding="iso-8859-15" responseEncoding="iso-8859-15" />

which solved previous encoding problems when passing special characters in urls.

How can I get this problem fixed so I can receive that characters in my controller?

Thanks in advance

  • 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-31T15:06:38+00:00Added an answer on May 31, 2026 at 3:06 pm

    The thing is that AJAX uses the UTF-8 encoding when it sends the request. But you have configured your server to expect requestEncoding="iso-8859-15" which is where the discrepancy comes from.

    Let’s suppose that you have an input field named Category in your form and the user enters the ñ character in it. If you use a normal Html.BeginForm the following POST request payload will be sent to the server:

    Category=%F1
    

    On the other hand if you use an Ajax.BeginForm, the following request POST payload will be sent to the server:

    Category=%C3%B1&X-Requested-With=XMLHttpRequest
    

    In this case the server is not capable of properly decoding this UTF-8 encoded request because it expects requests to be iso-8859-15 encoded.

    So you could modify your web.config to use UTF-8 request and response encoding for your site. Can’t think of a valid reason in 2012 to use any other encoding than UTF-8 in a web application.

    <globalization 
        enableClientBasedCulture="true" 
        uiCulture="auto" 
        culture="auto" 
        fileEncoding="utf-8" 
        requestEncoding="utf-8" 
        responseEncoding="utf-8" 
    />
    

    Also don’t forget to update any <meta> tags that you might have in your layouts in order to use UTF-8 as well:

    <meta charset="utf-8" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple form created using Ajax.BeginForm : <% using (Ajax.BeginForm(Update, Description, new
I have created an form validation using ajax/php. Each text box is validated using
I would like to have Ajax form in Rails so i'm using form_remote_tag. The
I have set up an AJAX contact form on a client's website. The problem
I have some AJAX work that brings across an additional form element that I
i have the following javascript to post a form through ajax without refreshing the
I am creating a form with AJAX. The way I have created the form
I have select inputs dynamically added to form by $(selector).append(html) I'm using live('change',handler) to
I have a hidden field on a form that is created in Razor using
I have created a form maker somewhat like Formtorch for codeigniter. The form consists

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.