0
Reply

Run SQL query from .NET ASPX page with C# page language calling 3rd party service with JavaScript

Patrick Wood

Patrick Wood

Sep 12 2010 3:54 PM
2.6k
I got help from BillyRayPreacherSon, TheBugSlayer, and drlex from Tek-Tips' forum and my friend Jah-Red to get to this point of understanding. This is now narrowed down to a .NET C# question.

My inquery begins at this forum thread:
http://www.tek-tips.com/viewthread.cfm?qid=1619151

So, long story short, I want to display my externally generated listing by the first letter only per page, exactly like these guys do: http://www.ticketnetwork.com/performers/concerts/a.aspx

The 3rd party service gave me these tools to work with, but I don't know how it works. It looks like XML it is pumping out, which might explain the JavaScript working the way it does.

These are the sites the 3rd party service gave me:
http://tnwebservices-test.ticketnetwork.com/tnwebservice/v3.0/TNWebService.asmx?op=SearchEvents

http://tnwebservices-test.ticketnetwork.com/tnwebservice/v3.1/tnwebservicestringinputs.asmx?WSDL


My page currently looks like this, calling all the items:

http://drewstickets.com/Concerts.aspx

and needs to look more like this, only calling every item by its 1st letter at a page:

http://www.ticketnetwork.com/performers/concerts/a.aspx


How do I place my SQL query in my pre-existing file in the proper syntax? I am in foreign territory since I usually work in PHP. I also don't know what the SQL columns are called since it is a 3rd party service. I can't help feeling the answer is staring me in the face.


The page file looks like this (using masterpage file):

<%@ page language="C#" autoeventwireup="true" inherits="Concerts, App_Web_g65xkisr" masterpagefile="~/BasePage.master" %>


<asp:Content ContentPlaceHolderID="contentBody" ID="cntBody" runat="server">

<script language="javascript" type="text/javascript">
document.write('<script language="javascript" src="http://tickettransaction.com/?bid='+4420+'&sitenumber='+2+'&tid=event_names&pcatid=2&showcats=true&title=Concerts Tickets"></' + 'script>');
</script>

</asp:Content>



And the query should look something like this:

SELECT * FROM Tickets WHERE TicketName = "0%" BETWEEN "9%"
SELECT * FROM Tickets WHERE TicketName = "A%"
SELECT * FROM Tickets WHERE TicketName = "B%"
SELECT * FROM Tickets WHERE TicketName = "C%"

SELECT * FROM Tickets WHERE TicketName = "Z%"