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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:51:11+00:00 2026-05-31T05:51:11+00:00

Here is the method I’m calling: public Bear GetBear(int bearId) { MyEntities be =

  • 0

Here is the method I’m calling:

public Bear GetBear(int bearId)
    {
        MyEntities be = new MyEntities ();
        Location bear = (from b in be.Bears
                        where b.id == bearId
                        select b).First();
        return bear;
    }

Here is how I call it:

$.ajax({ url: "Bear/GetBear", data: { bearId: 2}, success: function (bear) { alert(bear.id) } })

But, the text in the alerted dialog box is undefined. And when I’m moving through GetBear with breakpoint, the returned bear HAS id. What am I doing wrong?

  • 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-31T05:51:12+00:00Added an answer on May 31, 2026 at 5:51 am

    Shouldn’t you convert the data into json/xml/text/dataType (http://api.jquery.com/jQuery.ajax) before sending it back?

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

Sidebar

Related Questions

here's the method: public static int chooseStrat () { String[] strats = new String[1]
Here is one method that monkey patched the Dir[] method from autotest class Dir
Here's the method: public static String CPUcolor () { System.out.println (What color am I?)
https://stackoverflow.com/a/180191 Here a method is timed by calling System.nanoTime() in a normal block, while
Continued from the last question here: Log method name in Obj-C . I just
public class SomeAttr: Attribute { void Method() { //here I want to know the
I have written method which should return string with data from select query, but
I have this method here that gets an object from a JList. The object
I found a method here on stack overflow that strips all event handlers from
I have a method here, although I would like to pipe the output from

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.