response.write and Getstring

Results 1 to 2 of 2

Thread: response.write and Getstring

  1. #1
    Join Date
    Dec 1969

    Default response.write and Getstring

    greetings! I am looking to use the .GetString method to write out a recordset value into a drop down box on a web page. The following code works fine.. but I would like to be able to designate a specific value from the recordset to be the <BR>value that is listed by default. It can&#039;t be a hardcoded value, I need to be able to select the value on the fly <BR><BR><BR><BR> Response.Write "&#060;select name=""Category""&#062;" _<BR> & "&#060;option&#062;List of Categories:"<BR> Response.Write "&#060;option&#062;----------&#060;/option&#062;&#060;option&#062;"<BR> Response.Write objRS.GetString(,,,"&#060;/option&#062;&#060;option&#062;", "--NULL--")<BR> Response.Write "&#060;/option&#062;&#060;/select&#062;" <BR><BR>I am using this as an edit pice for the user; I want to have the value from the option box be what was in the recordset, yet I want the user to be able to select a value from the list loaded in the box if they desire.<BR><BR>Thanks in advance!

  2. #2
    Join Date
    Dec 1969

    Default ASPFAQs, category Databases, General

    The link to the ASPFAQs is at the top right corner of most every page on this site, including the one you are reading.<BR><BR>If you look in that category for the question on GETSTRING, you will find your answer. Down at the bottom, under "ADDENDUM".<BR><BR>Incidentally, it will also tell you how to chop off the extraneous &#060;option&#062; you are getting, so that you don&#039;t have to have a blank row in the &#060;SELECT&#062;.<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