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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:19:42+00:00 2026-05-17T16:19:42+00:00

I have a functional page posting data to a Page WebMethod [WebMethod()] public static

  • 0

I have a functional page posting data to a Page WebMethod

[WebMethod()]
public static string sayHello(string pTest, string pText)
{
  return pTest + " - " + pText;
}

which I call using this jQuery

$(document).ready(function () {
  $("#sayHelloButton").click(function (event) {
    var name = $('#name').val();
    var text = $('#text').val(); 
    var dataString = JSON.stringify({
      pTest: name,
      pText: text
    }); 

    $.ajax({
      type: "POST",
      url: "page.aspx/sayHello",
      contentType: "application/json; charset=utf-8",
      data: dataString,
      dataType: "json",
      success: AjaxSucceeded,
      error: AjaxFailed,
      beforeSend: AjaxStart,
      complete: AjaxEnd
    });
  });
});

but now it should also be possible to upload a file and here I am a bit lost.

From what I can read in different posts in here it is not possible but please correct me if I am wrong – but I have seen several jQuery plugins which make upload possible, e.g. through a Flash-script, but how will it then be possible to both post data and upload with only one click? Does anyone have any suggestions which upload plugin is best – and how i can succeed in upload and post in one action?

  • 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-17T16:19:42+00:00Added an answer on May 17, 2026 at 4:19 pm

    Can’t tell for all plugins, but I’m using jQuery Form without any problems. No flash involved, it just creates hidden iframe instead.

    Here’s a demo.

    but how will it then be possible to both post data and upload with only one click
    The process is the same as with normal ajax request. You declare a form element, but instead of $('#myform').submit(); do $('#myform').ajaxSubmit().

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

Sidebar

Related Questions

I have a function which sends specified form data to a php processing page.
I have a functional JSP page that accepts URL parameters and updates a table
Ok, I have page one(index), fully functional and working fine as is with all
I have this script loaded on a page: (function() { window.alert('bookmarklet started'); function AjaxSuccess(data,
I have this function in jQuery that gets data from a page with POST,
I have a page that is posting a JSON to a cfc, and getting
I have searched for this before posting.. I have a page in my site
I'm posting data to a page and after that I want to navigate to
I have an iPhone app which submits user entered data to a SQL database.
I have 2 functions on a seperate page that I am including of the

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.