ListBox Saved as Application Object

Results 1 to 2 of 2

Thread: ListBox Saved as Application Object

  1. #1
    Cheryl Guest

    Default ListBox Saved as Application Object

    &nbsp;<BR>Hello,<BR><BR>I&#039ve used the article here to save a Listbox as an application object in order to improve performance. It worked great!!! Thanks!<BR><BR>Now, I&#039m having the problem of needing to have the item most recently selected for that page show up in the ListBox. Currently, it is showing the top item in the listbox.<BR><BR>How can I do this without rebuilding the listbox (which was the whole reason I saved it as an Application object). <BR><BR>Thanks!!<BR><BR>Cheryl<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: ListBox Saved as Application Object

    Here&#039s one way (and if I understand your question, you don&#039t need to use an application object; the box will get remade with the correct selection each time the page is refreshed)...<BR><BR>&#060;%<BR>optsform = Array("choice1", "choice2", "choice3", "choice4")<BR>&#039have to use an array - don&#039t just type in the values<BR>sformchoice = Request.Form ("Submiss_type")<BR>%&#062;<BR>&#060;select name = "Submiss_type" style="background-color: rgb(0,255,255)"&#062;<BR>&#060;%<BR>For i = 0 to UBound (optsform)<BR>Response.Write "&#060;OPTION Value=&#039" & optsform (i) & "&#039"<BR>If optsform (i) = sformchoice Then Response.Write " SELECTED"<BR>Response.Write "&#062;" & optsform(i) & "&#060;/OPTION&#062;" & vbNewLine<BR>Next<BR>%&#062;<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