Building JSON Results Table FROM DB

Bob Schneider
Bob Schneider used Ask the Experts™
on
I want to take a page like this and create a JSON table so users could look up finishers based on one or more of the following search fields:
1) First Name
2) Last Name
3) Gender
4) Age
5) Bib
6) Race Participating in

All of these fields are in a sql server db will require a JOIN of three tables.

Tables:
1) Participant (First, Last, Gender) joined by ParticipantID to
2)  PartRace (Bib, Age) joined by RaceID to
3) RaceData (Race Entered)

Let me know what else I need to tell you to purt this together.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Bob SchneiderCo-Owner

Author

Commented:
Oops....that should have said I want a JSON page...
Web Ninja at large
Commented:
have a look at aspJSON, it's a classic asp library that'll allow you to load data from the database and convert it to a json formatted string with one line of code
Bob SchneiderCo-Owner

Author

Commented:
Thank you!
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Big MontyWeb Ninja at large
Commented:
my pleasure, let me know if you have any questions on it, as I've used it a bunch in my projects
Top Expert 2010
Commented:
How are you calling your C# method which returns the results?  And what is that method's signature?


For example, if you use AJAX from your View to call a method in your controller, you can return JSON by using the following pattern:


[HttpPost]
public JsonResult MyMethod()
{
    return Json(myObject);
}

Open in new window


The JsonResult class is part of the System.Web.Mvc library.
Big MontyWeb Ninja at large
Commented:
@Megan -that is for asp .net, and not classic asp which is what the OP asked for.
Top Expert 2010
Commented:
@Big Monty - I must have missed the "classic" ASP.  Where is that indicated?
Big MontyWeb Ninja at large
Commented:
the tag "ASP" technically refers to classic ASP, or Active Server Pages. People sometime mistake regular ASP (which is the industry standard term) for ASP .NET
Bob SchneiderCo-Owner

Author

Commented:
Thank you very much, both of you!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial