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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:27:11+00:00 2026-05-13T06:27:11+00:00

I am trying to add an ajax form to my application. The problem is

  • 0

I am trying to add an ajax form to my application. The problem is that I want to pass my input as gb2312 encoded. However I wasn’t able to do

new {accept-charset="gb2312"} 

as msdn suggested. I guess it’s because the “-” in “accept-charset” breaks the CSharp variable naming rule. I tried to add an “@” in front of “accept-charset” but it didn’t work either. Does anyone know what trick should I apply to solve this problem?

  • 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-13T06:27:12+00:00Added an answer on May 13, 2026 at 6:27 am

    MSDN is wrong: accept-charset is not a valid identifier.

    Try using the BeginForm overload that takes an IDictionary htmlAttributes instead of an Object.

    Example:

    <% var attributes = new Dictionary<string, Object>();
       attributes.Add("accept-charset","gb2312");
       using (Ajax.BeginForm( "action", null, new AjaxOptions { ... }, attributes ))
       {
     %>
    
    <% } %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to add validation to a form that is submitted by ajax,
I'm trying to add a table row with ajax/jquery that has a form element
Currently trying at add ajax to a site, after much reading I discovered that
I've been trying to add some AJAX/jQuery script to my site so that only
I am trying to create a simple ajax grid that allows me to add
I have a working Ajax form, now I'm trying to add file upload to
I'm trying to create a multi-level ajax form on my rails app that can
I am trying to add the same ajax call that gets triggered when a
I'm trying to add some AJAX to my forms, however I am extremely confused
I'm building a web calendar application and I'm trying to add a feature that

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.