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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:30:21+00:00 2026-06-17T10:30:21+00:00

I try to do use Ajax (through jQuery) in asp.net website (using vb.net 2.0).

  • 0

I try to do use Ajax (through jQuery) in asp.net website (using vb.net 2.0).

Here is my .aspx page (ajax.aspx):

    <%@ Page Language="vb" AutoEventWireup="true" CodeFile="ajax.aspx.vb" Inherits="_Ajax" %>

<!DOCTYPE html>
<html>
<head>
  <title>Calling page methods with jQuery</title>
  <style type="text/css">
    #Result {
      cursor: pointer;
    }
  </style>
</head>
<body>
  <div id="Result">Click here for the time.</div>

  <script src="jquery-1.8.3.js"></script>
  <script>
      $('#Result').click(function () {
          $.ajax({
              type: "POST",
              url: "ajax.aspx/HelloWorld",
              data: "{}",
              contentType: "application/json; charset=utf-8",
              dataType: "json",
              success: function (msg) {
                  // Replace the div's content with the page method's return.
                  $("#Result").text(msg.d);
              },
              error: function (xhr, ajaxOptions, thrownError) {
                  alert("xhr.responseText= " + xhr.responseText);
                  alert("xhr.responseStatus= " + xhr.responseStatus);
                  alert("thrownError= " + thrownError);
              }
          });
      });
  </script>
</body>
</html>

And here is code-behind file (ajax.aspx.vb):

    Imports System
Imports System.Web.Services

Public Class _Ajax
    Inherits System.Web.UI.Page

    Protected Sub Page_Load()

    End Sub

    <WebMethod()> _
    Public Shared Function HelloWorld() As String
        Return "Hello: "
    End Function

End Class

When I click on my div, ajax call failed with:

System.ArgumentException: Unknown web method HelloWorld.

[EDIT]

After refresh and restart browser a lot of times, web method is found!

I try now to add a new web method, but I get error “unknown web method” again.

I think it’s a cache problem.

Do you know how to force disable this kind of cache ?

  • 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-17T10:30:23+00:00Added an answer on June 17, 2026 at 10:30 am

    Finally, paritosh answer was useful.

    I had to install ASP.NET Ajax 1.0 on web server using ASP.NET 2.0.

    Here is the link :
    http://www.microsoft.com/en-us/download/details.aspx?id=883

    Then, web method is not found until i restart ISS website, I don’t know why, but it’s OK after restarting it.

    Thanks for answers.

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

Sidebar

Related Questions

I am using asp.net mvc 2.0 and jquery validate 1.7 ( http://bassistance.de/jquery-plugins/jquery-plugin-validation/ ) What
I am using asp.net mvc 3 jquery validate unobstructive javascript. I am trying to
I use 2 file index.js, upload.php try to upload file(img) through ajax and if
i try to use jquery .text() but not really work : Before <a id=group_name
I try to use the columnFilter add-on of jquery datatable but I couldn't make
I add a table dynamically to the page through ajax call, the table is
I need to use the $.ajax() call within jQuery to post a little bit
I am starting a new project using WCF so that I can use jQuery
I am having a couple of problems involving PHP & AJAX using jQuery. To
I am using the Jquery Form plugging to try and upload a picture to

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.