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

  • Home
  • SEARCH
  • 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 5929493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:25:43+00:00 2026-05-22T14:25:43+00:00

So I have this javascript as my call: $(#addNewThankYou).click(function () { var thankYouNote =

  • 0

So I have this javascript as my call:

$("#addNewThankYou").click(function () {
    var thankYouNote = $("#thankYouNote").html();

    var name = $("#enteredName").html();

    $.getJSON("/Home/AddEntryToDatabase", { Name: name, ThankYouNote: thankYouNote }, function (data) {
    ...
    });
});

The C# method behind is pretty standard:

public ActionResult AddEntryToDatabase(String Name, String ThankYouNote){
...
}

My problem lies potentially in the length of the string being passed in. For example, if I pass in a name and a note that are small (< 100 characters) I dont have any issues, it fires the method just fine. However, if I have a note that is pretty long, it doesn’t fire the method at all; when I click the button that calls the addNewThankYou.click is doesnt do anything. I tried putting a breakpoint on the first line of the method that gets called, and it doesn’t go in at all.

So, my question is this. Is there a limit to the string size that I can pass through the getJSON jQuery method? If so, any suggestions on how to get around this? I dont want to limit these thank you notes to 100 characters!

  • 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-22T14:25:44+00:00Added an answer on May 22, 2026 at 2:25 pm

    Historically you’ve always needed to treat long query strings (ie GET requests) with caution. In days gone by I believe query strings were restricted in length. It would probably be better if you were sending a large amount of data to use a ajax – POST instead.

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

Sidebar

Related Questions

I have this jQuery code: <script type=text/javascript > $(function() { $('#add_comment').bind('submit',function() //$(input[type=submit]).click(function() { var
I have a JavaScript function, pop_item . I have to call this from PHP,
I have this javascript: triggerAnimation(listItem,toggleToggleRadioListItem(listItem)); function triggerAnimation(listItem,passThruFunction){ listItem.find(.inlineLoading).show(); // pause and then call the
let's say I have this code in javascript: function doAnAjaxCall () { var xhr1
I have this javascript code : function showMyVideos(data) { var feed = data.feed; var
i have this code in javascript: var object = { get: function(id){ sel =
i have this index.html <script type=text/javascript src=js/jquery-latest.js></script> <script type=text/javascript src=jqFunc.js></script> <script type=text/javascript> var kamote
I have this JavaScript code: for (var idx in data) { var row =
I have this javascript function myFunction(source) { window.open(source, Title, 'width=400, height=400'); } and in
I have this line of Javascript which runs a function I sourced online. However

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.