March 20, 2000 01:20 PM

Using Stored Procedures to Build HTML Option Lists

Rating: (0)
SQL Server Magazine
InstantDoc ID #8377
I'm part of a team working on an Internet site that uses lots of SQL Server tables to drive HTML Select lists. On many pages, for example, users can enter a country or state by simply selecting the entry from a list. We used Active Server Pages (ASP) to generate the lists, as most applications do, and eventually created functions to generate the list and stored those functions in an Include file. However, ASP requires extra time on the server to load and process the Include file. In addition, you must use the entire Include file every time you want to create a Select list from a table.

On ...

...This article is for paid Professional Members only.

Already a Professional Member? Please log in now:

NOT A PROFESSIONAL MEMBER? YOU CHOOSE:

Professional Membership

Monthly

Annual

VIP Membership

Monthly

Annual

Add a Comment

Interesting. For review/update screens that display previosly entered data, this approach should also make it easier to return one of the options in the list with the SELECTED property (?) matching the correct option from the database - something that can be done in ASP but always a little bit of a pain.

Phil Revill 6/10/2003 3:25:49 PM


I've found that building this functionality within a COM component actually yields the best performance. I create my rs objects in the component method via a SP execution, then build the HTML return string in the component, and pass it back to my ASP page. I am going to experiment a little more with your technique, though. Thanks.

Louis Schilling 2/24/2001 11:15:56 AM


You must log on before posting a comment.

Are you a new visitor? Register Here
GOOGLE LINKS
SPONSORED LINKS
FEATURED LINKS