0

So I'm creating a web site where I can enter a specific artist's setlists. I have a table with the artist's discography which includes all her songs. So, now I want to create an Admin page where I can easily pick the tourdate and venue, and then enter the setlist.

In order to do this, I want to create autocomplete textboxes to make it easier. However, everything I've read is saying it's best to have each autocomplete reference its own asmx page. I tried doing this with 2 textboxes on the same page once, and after much hassle I gave in and put them in their own asmx page and all worked well.

However, this time I'm looking at probably 25 textboxes. I can't believe I'm going to need 25 web services, although I guess technically they'll all be identical because they'll read from the same table.

How can this be done? Can I just use the same asmx page over and over? If not, is there an easier way than creating 25 separate files?

For sample code on how I'm implementing this, you can see a previous question I've asked here:

Referencing a field on an asp.net page from a Web Service (asmx) page

Johnny Bones
  • 8,786
  • 7
  • 52
  • 117
  • how about an api project? – Steve Jan 15 '18 at 20:31
  • since each one has its own method, which determines its URL, then I don't see why you can't have as many methods in the class as you like. But if all of the autocompletes send and receive the same things (although, reading from the same table isn't the same as having the same inputs and outputs on the service endpoint...), then you should be able to use one single service and one single method. What reasons do these sources give for wanting everything to have a separate asmx page? – ADyson Jan 15 '18 at 20:37
  • As an aside, asmx is very much legacy these days, have you considered switching to Web API instead? – ADyson Jan 15 '18 at 20:38
  • Don't see why you would need multiple asmx, it's a webservice with an endpoint, you would just point to that url and it should work. I am assuming you used the same textbox id. Perhaps can post your javascript code? – penleychan Jan 15 '18 at 20:43
  • Short answer is no. – wazz Jan 16 '18 at 01:51

0 Answers0