Link to home
Start Free TrialLog in
Avatar of plowrypel
plowrypel

asked on

creating a web form that is populated from a database

I need to develop a form that is dynamically created based on data in a database.  I

I have a table with 20+ parameters, of which any specific function I use will call 1-5.  I need to create one page that displays all parameters so that I can update the functions / parameters table and another page that will only display the parameters associated with a given function.

I would like to avoid populating the page and then "hiding" certain parameters because more parameters may be added at any given time
Avatar of strickdd
strickdd
Flag of United States of America image

In your SQL use parameters in the WHERE clause to determine what to display:

SELECT * FROM MyTable WHERE Parameter = COALESCE(@Parameter, Parameter)

this SELECT statement will allow you to pass in a NULL value and return ALL records regardless of Parameter and then if you specify a value, it will only return that parameter.
Avatar of plowrypel
plowrypel

ASKER

yes, but how do I create the labels / textboxes on the page with the data (label names, etc.) returned?
ASKER CERTIFIED SOLUTION
Avatar of strickdd
strickdd
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial