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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:54:23+00:00 2026-05-24T17:54:23+00:00

Here is my code <html xmlns=http://www.w3.org/1999/xhtml> <head runat=server> <title></title> <script type=text/javascript src=<%= ResolveUrl(Scripts/jquery-1.3.2.min.js) %>></script>

  • 0

Here is my code

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript" src="<%= ResolveUrl("Scripts/jquery-1.3.2.min.js") %>"></script>
</head>

<body>
    <form id="form1" runat="server">
    <div>
    <input type="button" id="btn" value= "call web service" onclick="callwebservice()" />
    </div>
    </form>
</body>
</html>
<script type="text/javascript" language="javascript">
function AjaxFailed(result) {
            alert('call stastus:' + result.status + ' ' + result.statusText);
            alert('responsetest"'+result.responseText);
            alert('errorthrown' + result.errorThrown);

        }
        function callwebservice() {
            $.ajax(
                    {
                        type: "POST",
                        url: "default.aspx/LoginFromFacebook",
                        data: "",
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function(response) {
                            alert(response);
                        },
                        error: AjaxFailed
                    }
                   );
        }
</script>

code behind -----------------

[WebMethod()]
    public static string LoginFromFacebook()
    {
        return "helloworld";
    }

This is very simple code I have only one web method in my default.aspx file when i am calling the webmethod I am getting response code 200 ok.
I investigated using fiddler
response is as below
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Mon, 15 Aug 2011 09:16:21 GMT
Content-Length: 1535

don’t know why this is happening. I am expecting only string as response where i am getting whole page’s html as response.

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

    there is a problem with web site and web applications in visual studio. you can just put the design code in your aspx file or just use web-service instead of the default.aspx.
    following link containing basic steps for success ajax request using jQuery, JavaScript or asp.net ajax,

    sample site for basic ajax function

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

Sidebar

Related Questions

Say <html xmlns=http://www.w3.org/1999/xhtml> <head> </head> <body> <div>code here</div> <html><head>...</head><body>...</body></html> </body> </html> I have tested
I'm using an HTML sanitizing whitelist code found here: http://refactormycode.com/codes/333-sanitize-html I needed to add
Using preview 4 of ASP.NET MVC Code like: <%= Html.CheckBox( myCheckBox, Click Here, True,
See here: http://code.google.com/p/ie7-js/ Does anyone have any experience or remarks about this javascript? Is
In this google map sample: http://code.google.com/apis/maps/documentation/javascript/examples/streetview-simple.html If the user dropped the little guy far
In this google map sample: http://code.google.com/apis/maps/documentation/javascript/examples/streetview-simple.html If the user dropped the little guy far
My Richfaces 4.0 project won't work with ui:composition tag. Here is a xhtml-file code:
Here is my page. I need to insert whole code here. <!DOCTYPE html PUBLIC
I am using an horizontal accordion from here: http://www.dynamicdrive.com/dynamicindex17/haccordion.htm I got it to display
You can play with my code here: http://jsfiddle.net/gqQnd/ Basically I want to have a

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.