---
title: "Visa aktiv sida i dropdownmeny."
type: "forum-thread"
url: "https://www.webforum.nu/amne/asp/14088-visa-aktiv-sida-i-dropdownmeny"
topic: "ASP"
topic_url: "https://www.webforum.nu/amne/asp"
author: "StefanP"
published: "2002-01-30T13:21:00.000Z"
updated: "2002-01-30T13:46:00.000Z"
replies: 2
views: 204
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/asp/14088-visa-aktiv-sida-i-dropdownmeny"
---

# Visa aktiv sida i dropdownmeny.

## #1 — StefanP, 2002-01-30T13:21Z

Hejsan.
Säg att jag har en databas med en tabell som innehåller ID, Text, Rubrik.

Sen så gör jag en dropdown som länkar till alla ID'n. tex meny.asp?ID=1

Hur gör jag då för att göra den valda "SELECTED" i dropdownen? Så man ser vart man är.

\[Redigerat av StefanP den 30 jan 2002\]

Permalänk: https://www.webforum.nu/p/14088

## #2 — LarsG, 2002-01-30T13:31Z

```
'öppna databas etc
set rs = databas.execute("select id,rubrik from ogrish")

if not rs.eof then
response.write "<select name='news'>"
while not rs.eof
  if clng(rs("id")) = clng(request.querystring("id")) then
   s = "selected"
  else
   s = ""
  end if
  response.write "<option value='" & rs("id") & "'" & s & ">" & rs("rubrik") & "</option"
  rs.movenext
wend
  response.write "</select>"
end if
rs.close
```

Permalänk: https://www.webforum.nu/p/308794

## #3 — StefanP, 2002-01-30T13:46Z

Suveränt tack!

Permalänk: https://www.webforum.nu/p/308795

---

Tråden på webben: https://www.webforum.nu/amne/asp/14088-visa-aktiv-sida-i-dropdownmeny
