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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:35:49+00:00 2026-06-12T04:35:49+00:00

I post data to my aspx file qith the following code: $.ajax({ type: ‘POST’,

  • 0

I post data to my aspx file qith the following code:

 $.ajax({
            type: 'POST',
            url: "Ajax_Text.aspx?rand=" + myRand
                                        + "&id=" + $(".articleID").attr('title')
                                        + "&text=" + $("#text").val(),
            cache: false,
            beforeSend: function () {

            },
            success: function (data) {
                alert(data); 
            }
        });

Why i catch the text value by using the following code

 string text = "";

            if (!String.IsNullOrEmpty(Request.QueryString["text"]))
            {
                text = Request.QueryString["text"].ToString();
            }
            else
            {
                text = "";
            }

and not this code:

string text = "";

            if (!String.IsNullOrEmpty(Request.Form["text"]))
            {
                text = Request.Form["text"].ToString();
            }
            else
            {
                text = "";
            }

Why is that? I expected Request.Form to work as i post data with jquery! Any ideas?

I suspect that the problem is that i have my input in the url parameter. Maybe i should put it to a data parameter but that means it will become a json request!

  • 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-06-12T04:35:51+00:00Added an answer on June 12, 2026 at 4:35 am

    POST data are not send in query string but added to the request body. Try this code:

    $.ajax({
            type: 'POST',
            url: "Ajax_Text.aspx",
            data: {'rand': myRand, 'id': $(".articleID").attr('title'), 'text': $("#text").val()},
            cache: false,
            beforeSend: function () {
    
            },
            success: function (data) {
                alert(data); 
            }
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code: $.ajax({ url: some-page.aspx, type: POST, data: {fileName: file, param02:
Aspx Page: $(document).ready(function() { $(#btnn).click(function() { $.ajax({ type: POST, url: TestPage.aspx/emp, data: {}, contentType:
I have the following form <form id=upload method=post EncType=Multipart/Form-Data action=reciver.aspx> <input type=file id=upload name=upload
$.ajax( { type: POST, url: Default.aspx/GetAge, data: {}, contentType: application/json; charset=uft-8, dataType: json, success:
$.ajax({ type: POST, url: /zzz/bbb/abcd.aspx?deleteIDs= + request_ids, contentType: application/x-www-form-urlencoded, data: '', dataType: html, complete:
I have the following client side code: <form action=PhotoStore.aspx id=form1 method=post enctype=multipart/form-data> <div> <input
I have the following jQuery ajax request in a .js file: $.ajax({ type: GET,
I'm doing the following ajax call: //exif loader function LoadExif(cImage) { $.ajax({ type: POST,
on the server side, I've got these: ASPX: <form id=form1 runat=server enctype=multipart/form-data> <input type=file
Django code samples involving post data often shows code similar to this: if request.method

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.