---
title: "Includefil mitt i aspkod??!?!"
type: "forum-thread"
url: "https://www.webforum.nu/amne/asp/7056-includefil-mitt-i-aspkod"
topic: "ASP"
topic_url: "https://www.webforum.nu/amne/asp"
author: "brw"
published: "2000-11-07T23:10:00.000Z"
updated: "2000-11-08T07:45:00.000Z"
replies: 2
views: 159
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/7056-includefil-mitt-i-aspkod"
---

# Includefil mitt i aspkod??!?!

## #1 — brw, 2000-11-07T23:10Z

Hej kan man på något sätt includera värden från en includefil mitt i aspkoden typ:

```
<%
If counter mod 2 = 0 then

      color = "<!--#include file="annancolor.inc"-->"
   Else
      color = "<!--#include file="whitecolor.inc"-->"
   End If 
%>
```

i php vet jag man kan köra nå require="bla.inc" el. ngt liknande.. finns det något sådant i asp?

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

## #2 — erik_nordell, 2000-11-08T06:23Z

Du får göra så här i inc filerna:
ex i whitecolor.inc:
\<%
color1 = "white"
%\>
ex i annancolor.inc
\<%
color2 = "green"
%\>

\<!--#include file="whitecolor.inc"--\>
\<!--#include file="annancolor.inc"--\>

\<%
If counter mod 2 = 0 then
color = color1
Else
color = color2
End If 
%\>

Det borde fungera! :o

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

## #3 — rymdknark, 2000-11-08T07:45Z

<http://cgi.webforum.nu/wf/Forum11/HTML/000095.html>

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

---

Tråden på webben: https://www.webforum.nu/amne/asp/7056-includefil-mitt-i-aspkod
