Using a Generic ASP to populate a form

Results 1 to 2 of 2

Thread: Using a Generic ASP to populate a form

  1. #1
    Join Date
    Dec 1969

    Default Using a Generic ASP to populate a form

    I have used some code that I found at 4-Guys (A Generic Database Record Insertion Script) that inserts data into a database by matching the form field names with the database table field names. This works well, but now I what to do the reverse, have an ASP script that will fill in the values of the form field from its matching database table field. However I do not want to add ASP scriping to the form field value property. What I am trying to do is built a template for my clerical staff, that has the nessecary scripting in place to populate a form that they create. All they need to do is ensure the field names in the form they create match the database fields. Is this possible to do?

  2. #2
    Join Date
    Dec 1969

    Default RE: Using a Generic ASP to populate a form

    What about just a series of SUBs that each creates a particular kind of form field:<BR><BR>&#060;%<BR>Sub TextField( name )<BR>&nbsp; &nbsp; Response.Write "&#060;INPUT Type=Text Name=&#039;" & name & "&#039; Value=&#039;" & RS(name) & "&#039;&#062;"<BR>End Sub<BR>%&#062;<BR><BR>Then, to build a form, the simply do:<BR><BR>&#060;%<BR>Form "someFormName"<BR>TextField "someDataFieldName"<BR>List "someDropDownListFieldName"<BR>...<BR>%&#062;<BR>< BR>You can get fancier or simpler as you need, of course.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts