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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:06:46+00:00 2026-05-25T17:06:46+00:00

My issue is for some strange reason it seems stuck in the page controller

  • 0

My issue is for some strange reason it seems stuck in the page controller so instead of getting out and going into the ajax controller I have it trying to go down that route in the page controller

1st try

http://localhost:2185/Alpha/Ajax/GetBlah_Name/?lname=Ge&fname=He

2nd try

http://localhost:2185/Patient/~/Ajax/GetBlah_Name/?lname=Ge&fname=He

Objective

http://localhost:2185/Ajax/GetBlah_Name/?lname=Ge&fname=He

Page button to call jquery

<a style="margin-left: 310px;" href="javascript:void(0)" onclick="getBlah()"
                    class="button"><span>Lookup</span></a>  

Jquery code

1st try

{
   $.getJSON(callbackURL + 'Ajax/GetBlah_Name/?lname=' + $('#Surname').val() + '&fname=' + $('#FirstName').val(), null, GetResults)
}

2nd try

{
   $.getJSON(callbackURL + '~/Ajax/GetBlah_Name/?lname=' + $('#Surname').val() + '&fname=' + $('#FirstName').val(), null, GetResults)
}

In summary I don’t know why it won’t break out of the controller and go into the Ajax controller like it has done so in all the other projects I’ve done this in using the 1st try solution.

  • 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-25T17:06:47+00:00Added an answer on May 25, 2026 at 5:06 pm

    It seems you want to cal a controller at ~/Ajax. Is it? If yes, you should use this code:

       $.getJSON(callbackURL + '/Ajax/GetBlah_Name/?lname=' + $('#Surname').val() + '&fname=' + $('#FirstName').val(), null, GetResults)
    

    UPDATE:
    This will work for your Q, but the complete solution is @Darin Dimitrov‘s answer. I suggest you to use that also.

    UPDATE2
    ~ is a special character that just ASP.NET works with it! So http doesn’t understand it. and if you start your url with a word -such as Ajax-, the url will be referenced from where are you now (my english is not good and I can’t explain good, see example plz). For example, you are here:

    http://localhost:2222/SomeController/SomeAction
    

    when you create a link in this page, with this href:

    href="Ajax/SomeAction"
    

    that will be rendered as

    http://localhost:2222/SomeController/Ajax/SomeAction
    

    But, when url starts with /, you are referring it to root of site:

    href="/Ajax/SomeAction"
    

    will be:

    http://localhost:2222/Ajax/SomeAction
    

    Regards

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

Sidebar

Related Questions

Trying to figure out a rather annoying IE7 CSS issue. For some strange reason
I have a very strange issue that only affects webkit browsers for some reason,
I have the following code pasted below. For some reason, the response.redirect seems to
Having a strange issue with the TabContainer in the AJAX Toolkit. We have several
So I have some strange issue with nl2br so I have the following code:
Having a strange issue with some C# code - the Getter method for a
Debugging some finance-related SQL code found a strange issue with numeric(24,8) mathematics precision. Running
I have some issue with a Perl script. It modifies the content of a
I'm having an issue getting some code to work. Is there a way to
I have some unsolved issue with threads. It's my first time doing it. I

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.