Hur gör jag om jag vill ha default.asp?url=1467 som startsida istället för default.asp?? Bifogar lite kod! Hej!default.asp?url=1467 som startsida??
----------------
<code><html>
<head>
<title>Josefine Sundström - Josefine önskar alla en god jul!</title>
<link rel="stylesheet" type="text/css" href="josefine.css">
<!-- Begin
function popUp() {
props=window.open('int/index.htm', 'poppage', 'toolbars=0, scrollbars=0, location=0, statusbars=0, menubars=0, resizable=0, width=450, height=450 left = 100, top = 100');
}
// End -->
</head>
<body bgcolor="#BFC8C0">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="1"><tr><td width="546"><!--#include file="meny2.asp" --></td></tr><tr>
<td background="images/background.gif" width="546">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="97%">
<tr><td width="74%" valign="top">
<img border="0" src="hoger_meny/mellan.gif" width="1" height="4"><%
If Request.Querystring("url") <> "" Then
Set MinCon = Server.CreateObject("ADODB.Connection")
Set RecSet = Server.CreateObject("ADODB.RecordSet")
MinCon.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("db/nyheter.mdb")
SQL = "SELECT TOP 1 * From nyheter Where url=" & Request.Querystring("url") &" AND visa = 'sida'"
RecSet.Open SQL, MinCon
Do While Not RecSet.EOF
%><%
Dim myMeny, kika
kika = "" & RecSet("kommentar")
myMeny = CStr(kika)
Select Case myMeny
Case "home"
Server.Execute("home_menu.asp")
Case "information"
Server.Execute("information_menu.asp")
Case "media"
Server.Execute("media_menu.asp")
Case "contact"
Server.Execute("contact_menu.asp")
Case "other"
Server.Execute("menu.asp")
End Select
%><table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" width="98%" height="1"><tr><td width="68%" valign="top" height="1"><br><%
kika = "" & RecSet("url")
myMeny = CStr(kika)
Select Case myMeny
Case 1488
Server.Execute("temp/~temp1488.asp")
Case 1487
Server.Execute("temp/~temp1487.asp")
Case 1486
Server.Execute("temp/~temp1486.asp")
Case 1485
Server.Execute("temp/~temp1485.asp")
Case 1484
Server.Execute("temp/~temp1484.asp")
Case 1483
Server.Execute("temp/~temp1483.asp")
Case 1481
Server.Execute("temp/~temp1481.asp")
Case 1480
Server.Execute("temp/~temp1480.asp")
Case 1479
Server.Execute("temp/~temp1479.asp")
Case 1478
Server.Execute("temp/~temp1478.asp")
Case 1477
Server.Execute("temp/~temp1477.asp")
Case 1476
Server.Execute("temp/~temp1476.asp")
Case 1475
Server.Execute("temp/~temp1475.asp")
Case 1474
Server.Execute("temp/~temp1474.asp")
Case 1473
Server.Execute("temp/~temp1473.asp")
Case 1472
Server.Execute("temp/~temp1472.asp")
Case 1471
Server.Execute("temp/~temp1471.asp")
Case 1470
Server.Execute("temp/~temp1470.asp")
Case 1469
Server.Execute("temp/~temp1469.asp")
Case 1468
Server.Execute("temp/~temp1468.asp")
Case 1467
Server.Execute("temp/~temp1467.asp")
Case 1466
Server.Execute("temp/~temp1466.asp")
Case 1482
Server.Execute("temp/~temp1482.asp")
End Select
%><%
RecSet.MoveNext
Loop
RecSet.Close
Set RecSet = Nothing
MinCon.Close
Set MinCon = Nothing
End If
%></code>Sv: default.asp?url=1467 som startsida??
Förstod inte till 100% vad du ville ha, med risk att jag har begripit fel så försöker jag förklara det jag tror du söker.
Är det så att när du går in på startsidan så skall det vara url nr 1467 som öppnas som standard?
Gör så här:
QueryID = Request.Querystring("url")
If QueryID = "" Then QueryID = 1467
Sedan i databassökningen ersätter du Request.Querystring("url") med variabeln QueryID istället.
Hoppas jag förstod dig rätt.
//Dataknutte