I’m new to jquery and asp.net so please forgive if this is an obvious question. I’m using a jquery autocomplete plugin which requires that the page it looks up asynchronously for data is in this format as pure text only:
product1|price1
product2|price2
product3|price3
WITHOUT ANY OTHER HTML MARKUP. Any other html tags seems to cause problems. Normally for a page like that I would use a repeater and some standard database calls and output the 2 fields. This however creates html tags.
How can I output this data as text only with no other markup whatsoever?
If you have a bare page with no master page referenced a repeater shouldn’t produce any html. Make sure in the HTML view you only have:
An alternative would be to add a new Handler to your project which is a class that implements the IHttpHandler interface. This would allow you to output your code directly. This would end up looking like:
If you have added this to a project as a new Handler (from add items) it should have a .ashx extension. Otherwise you’ll need to register it in your web.config with its type and filename.