[citat]vid response.redirect så skickas en felmeddelande till besökarens webbläsare med adressen till sidan som skall laddas, ytterligare en onödig omväg via webbläsaren. server.transfer flyttar exekveringen direkt i servern. (Fungerar med >iis4?) [/citat]
Nej, det funkar bara på 3.0 ASP
Bidrag... vet inte om detta är ngt att hja, men en bra sökfunktion, som man kan modifiera som man vill...
[kod]
SUB Build_search_std
'bygg upp IN
if request("exakt") ="yes" then session("exakt") = "yes" else session("exakt") = ""
if request("no_upphavd") ="yes" then session("no_upphavd") = "yes" else session("no_upphavd") = ""
if request("ISO")= "1" then
search_type = search_type + "1,"
session("ISO") = "1"
else
session("ISO")=""
end if
'if request("IEC")= "2" then
'search_type= search_type + "2,"
'session("IEC") = "2"
'else
'session("IEC")=""
'End If
if request("SS")= "3" then
search_type= search_type + "3,"
session("SS") = "3"
else
session("SS")=""
End If
'if request("DIN")= "4" then
'search_type = search_type + "4,"
'session("din") = "4"
'else
'session("din")=""
'End If
search_type=Left(search_type,Len(search_type)-1)
'Bygg upp startsträng
IF session("no_upphavd") = "" then
strSQL_std = "select typ,dokid,pdfnamn,storlek,description,title,for_title,pages, edition,ann_date,pub_date,price from vy_Katalog_online_total where typ in("& search_type &") "
else
strSQL_std = "select typ,dokid,pdfnamn,storlek,description,title,for_title,pages, edition,ann_date,pub_date,price from vy_Katalog_online_total where typ in("& search_type &") and ann_date is null "
end if
'-------------------------------ordningen räknad från XXXXXX--------------
'1=ISO
'2=IEC
'3=SS
'4=DIN
IF request("exakt")="yes" then
if len(request("description")) >=1 then tmpSQL_std=tmpSQL_std+" and description ='"&(request("description"))&"' "
if len(request("number")) >=1 then tmpSQL_std=tmpSQL_std+" and number like '%"&(request("number"))&"%' "
if len(request("title")) >=1 then tmpSQL_std=tmpSQL_std+" and title ='"&(request("title"))&"' "
if len(request("for_title")) >=1 then tmpSQL_std=tmpSQL_std+" and for_title ='"&(request("for_title"))&"' "
if len(request("dokid")) >=1 then tmpSQL_std=tmpSQL_std+" and dokid = "&(request("dokid"))&""
else
if len(request("description")) >=1 then tmpSQL_std=tmpSQL_std+" and Description like '%"&(request("description"))&"%' "
if len(request("number")) >=1 then tmpSQL_std=tmpSQL_std+" and number like '%"&(request("number"))&"%' "
if len(request("title")) >=1 then tmpSQL_std=tmpSQL_std+" and title like '%"&(request("title"))&"%' "
if len(request("for_title")) >=1 then tmpSQL_std=tmpSQL_std+" and for_title like '%"&(request("for_title"))&"%' "
if len(request("dokid")) >=1 then tmpSQL_std=tmpSQL_std+" and dokid = "&(request("dokid"))&""
end if
session("tmpSQL_std") = tmpSQL_std
session("strSQL_std") = strSQL_std
end sub
[/kod]
rättat till lite i koden ovan, därav editeringen...
------------------
Rammstein rules - Bestrafe mich
[Redigerat av hopparn den 01 dec 2001]
[Redigerat av hopparn den 01 dec 2001]
Nej, det funkar bara på 3.0 ASP
Bidrag... vet inte om detta är ngt att hja, men en bra sökfunktion, som man kan modifiera som man vill...
[kod]
SUB Build_search_std
'bygg upp IN
if request("exakt") ="yes" then session("exakt") = "yes" else session("exakt") = ""
if request("no_upphavd") ="yes" then session("no_upphavd") = "yes" else session("no_upphavd") = ""
if request("ISO")= "1" then
search_type = search_type + "1,"
session("ISO") = "1"
else
session("ISO")=""
end if
'if request("IEC")= "2" then
'search_type= search_type + "2,"
'session("IEC") = "2"
'else
'session("IEC")=""
'End If
if request("SS")= "3" then
search_type= search_type + "3,"
session("SS") = "3"
else
session("SS")=""
End If
'if request("DIN")= "4" then
'search_type = search_type + "4,"
'session("din") = "4"
'else
'session("din")=""
'End If
search_type=Left(search_type,Len(search_type)-1)
'Bygg upp startsträng
IF session("no_upphavd") = "" then
strSQL_std = "select typ,dokid,pdfnamn,storlek,description,title,for_title,pages, edition,ann_date,pub_date,price from vy_Katalog_online_total where typ in("& search_type &") "
else
strSQL_std = "select typ,dokid,pdfnamn,storlek,description,title,for_title,pages, edition,ann_date,pub_date,price from vy_Katalog_online_total where typ in("& search_type &") and ann_date is null "
end if
'-------------------------------ordningen räknad från XXXXXX--------------
'1=ISO
'2=IEC
'3=SS
'4=DIN
IF request("exakt")="yes" then
if len(request("description")) >=1 then tmpSQL_std=tmpSQL_std+" and description ='"&(request("description"))&"' "
if len(request("number")) >=1 then tmpSQL_std=tmpSQL_std+" and number like '%"&(request("number"))&"%' "
if len(request("title")) >=1 then tmpSQL_std=tmpSQL_std+" and title ='"&(request("title"))&"' "
if len(request("for_title")) >=1 then tmpSQL_std=tmpSQL_std+" and for_title ='"&(request("for_title"))&"' "
if len(request("dokid")) >=1 then tmpSQL_std=tmpSQL_std+" and dokid = "&(request("dokid"))&""
else
if len(request("description")) >=1 then tmpSQL_std=tmpSQL_std+" and Description like '%"&(request("description"))&"%' "
if len(request("number")) >=1 then tmpSQL_std=tmpSQL_std+" and number like '%"&(request("number"))&"%' "
if len(request("title")) >=1 then tmpSQL_std=tmpSQL_std+" and title like '%"&(request("title"))&"%' "
if len(request("for_title")) >=1 then tmpSQL_std=tmpSQL_std+" and for_title like '%"&(request("for_title"))&"%' "
if len(request("dokid")) >=1 then tmpSQL_std=tmpSQL_std+" and dokid = "&(request("dokid"))&""
end if
session("tmpSQL_std") = tmpSQL_std
session("strSQL_std") = strSQL_std
end sub
[/kod]
rättat till lite i koden ovan, därav editeringen...
------------------
Rammstein rules - Bestrafe mich
[Redigerat av hopparn den 01 dec 2001]
[Redigerat av hopparn den 01 dec 2001]

Comment