Is it possible to modify the script so that it only displays some of the fields? For example, I'd like to stop the ID field from displaying, but I'd still like to use its value to pass the ID to a details page.
Of course! ASP wouldn't be very useful if you couldn't do things like that.
Unfortunately it seems that the more I try to shorten my sample scripts, the
less clear some things become. This probably wouldn't have ever been a question
if I had done things the old fashioned way and hard-coded my headers and built my
table by hand. In an effort to make things more modular and less likely to need
massive changes when you attach the script to your own database, I let the data
returned from the database dictate the table columns that are displayed, but that
doesn't mean that you have to do it that way.
Take a look at this alternate version of the sample.
Notice that it doesn't display the id field in the table, but if you hover over a record,
the tool tip that appears will contain the salesman's ID. You can use the same method to
pass the value via a QueryString parameter or display it in any way you'd like... if you can
do something in HTML, there's no reason you can't get ASP to do it for you.
Please note: This form is only for submitting questions about the sample for us to consider including in the FAQ. If we feel the question merits inclusion, we will include it along with a reply. We will not respond to your email individually.