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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:50:37+00:00 2026-06-17T08:50:37+00:00

I created an aspx file that act as JSON result. Response.Clear() Response.ContentType = application/json;

  • 0

I created an aspx file that act as JSON result.

Response.Clear()
Response.ContentType = "application/json; charset=utf-8"

I have another page (another domain) that read that JSON. But I got syntax error: invalid label when calling the JSON value.

$.getJSON( "http://a.com/json.aspx?format=json&jsoncallback=?" , function(data) {

       alert(data);
    });
  }
  • 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-17T08:50:38+00:00Added an answer on June 17, 2026 at 8:50 am

    You need the server to output JSONP, not JSON. JSONP is different. JSONP is used when the server is on a different domain then the client.

    JSONP is actually just a JavaScript file, so it should be served with Content-type: text/javascript. When serving JSONP, you should wrap the JSON in the value of jsoncallback.

    So, your web server should output something similar to:

    jQuery12345({"name":"joe","age":22})
    

    Where jQuery12345 is the value of the jsoncallback parameter in the query string, which will be automatically set by jQuery.

    $.getJSON( "http://a.com/json.aspx?format=json&jsoncallback=?" , function(data) {
        alert(data);
    });
    

    jQuery will automatically replace the ? with a value.

    More info on JSONP: http://en.wikipedia.org/wiki/JSONP

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

Sidebar

Related Questions

I have created a test website that contains a single ASP.net index.aspx file that
I have created one aspx Page from that i need to access the property
Hello I have created and application which contains a gridview that is populated by
Here is my situation: I have an application that use a configuration file. The
I have created a listview using following tutorial link http://www.ezzylearning.com/tutorial.aspx?tid=1763429 Outcome of this is,
I have an aspx page that on a button click creates a BackgroundWorker and
I am trying to send an XML file that I created in my memorystream.
I created a .aspx web page for SharePoint 2010 that uses JQuery to extract
I have a problem, just redone a homepage that was in ASP (ASPX) to
I created a TabPanel on my aspx file. In my code behind, I dynamically

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.