1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Time Saver - Making Combo boxes

Discussion in 'C#' started by jaymcc, Jan 31, 2006.

  1. #1
    This is a function i put into most ASP sites I build, makes it really easy to put together drop down lists:
    function MakeComboBox(ComboName, rsTemp, ValueField, DescriptionField, Prompt)
     Response.write "<SELECT Name=""" & ComboName & """>"
     Response.write "<OPTION Value=""0"">" & Prompt & "</OPTION>"
     while not rsTemp.EOF
      Response.write "<OPTION Value=""" & rsTemp(ValueField) & """>" & rsTemp(DescriptionField) & "</OPTION>"
     response.write "</SELECT>"
    end function
    Code (markup):
    jaymcc, Jan 31, 2006 IP