0

Ok, so thanks to some kind help from this site last night and yet more Googling this morning, I have managed to create a VB function which gives me this:

http://test.hartnollguitars.co.uk/makeJSON.aspx

This is a list of 50 items within my product database in a JSON format.

Now I want to use this in an Autocomplete field in a product search in the sales system that I am rebuilding.

What's the best process here? I've a few questions

  1. Should this output actually be saved as a text file, or is it possible to use it directly from this aspx file? (this is preferred as the data can change regularly)
  2. I am happy to use Javascript in my back-end content management system (which I am working on at the moment) but would like to know how to do this server-side as well.

Given point 2, I'd like to use http://www.asp.net/ajaxlibrary/AjaxControlToolkitSampleSite/autocomplete/autocomplete.aspx rather than http://jqueryui.com/demos/autocomplete/ although, both do essentially what I am after.

Thinking as I type... I guess using Javascript client-side for this application would be fine, but I still want to know how to decode this stuff server-side so I can use it to navigate the Facebook Graph and output data (specifically event data) to my website for all users. Currently I have a lot of hashed-up code that does this!!!!

EDIT: Forgot to emphasis... I'm using VB not C#! There's load of online tutorial for C#, but really struggling to find helpful examples for VB

Joel Coehoorn
  • 380,066
  • 110
  • 546
  • 781
Jamie Hartnoll
  • 6,965
  • 13
  • 55
  • 95
  • The JSON at http://test.hartnollguitars.co.uk/makeJSON.aspx needs to be output as ContentType "application/json", so that it is not wrapped in HTML
     tag. Take a look at this post: http://stackoverflow.com/questions/1678101/how-to-return-json-from-asp-net-asmx. Once that is done it will be easier to pull your JSON into jquery or AJAX.
    – Zim Nov 05 '11 at 11:23
  • Ah, ok, I just put it in the
     tag to make it look righ to me in the browser, essentially I was trying o get something which looked like the output from Facebook graph examples. I'll have mre time to try those examples tomorrow.... Not allowed to do coding on a Sunday!!
    – Jamie Hartnoll Nov 06 '11 at 10:53

0 Answers0