---
title: "Nat skumt med replace..."
type: "forum-thread"
url: "https://www.webforum.nu/amne/asp/49031-nat-skumt-med-replace"
topic: "ASP"
topic_url: "https://www.webforum.nu/amne/asp"
author: "annesophie"
published: "2002-07-30T06:41:39.000Z"
updated: "2002-07-30T08:06:24.000Z"
replies: 4
views: 213
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/49031-nat-skumt-med-replace"
---

# Nat skumt med replace...

## #1 — annesophie, 2002-07-30T06:41Z

Jag forsoker att markera en sokt text eller ett sokt ord (som kommer in pa sidan via en querystring = highlight). Det funkar. 

Problemet ar att, trots att highlight delen funkar som den ska, sa hander nat med tabellen. Om jag, som i nedan exempel, anvander replace pa tex (rs("features")) sa laggs (rs("features")) delen utanfor tabellen...den hoppar liksom ur sin cell. Om jag *inte* anvander replace sa ligger informationen snyggt och prydligt kvar i sin cell.

**Kan ni se vad jag gor fel????????????** :q 

Detta ar da *en del* av min string. 

```
		strList = strList & "				<tr>" & vbcrlf
		strList = strList & "					<td colspan=""3"" class=""breadjustify"" valign=""top"">" & vbcrlf
		strList = strList & "						"& strOutline &"" & vbcrlf
		strList = strList & "						<p><b>Features:</b></p>" & vbcrlf
		[b]strList = strList & "                                           "& response.write (replace(rs("features"),highlight, "<b>" & highlight & "</b>",1,-1,vbTextCompare)) &"" & vbcrlf[/b]
		strList = strList & "						<p><b>Specification:</b></p>" & vbcrlf
		strList = strList & "						"& rs("specification") &"<br>" & vbcrlf
		strList = strList & "						"& strOutline2 &"<br>" & vbcrlf
		strList = strList & "					</td>" & vbcrlf
		strList = strList & "				</tr>" & vbcrlf
```

...sa har sag det ut *innan*...da det ligger kvar i cellen:

```

		strList = strList & "					<td colspan=""3"" class=""breadjustify"" valign=""top"">" & vbcrlf
		strList = strList & "						"& strOutline &"" & vbcrlf
		strList = strList & "						<p><b>Features:</b></p>" & vbcrlf
		[b]strList = strList & "						"& rs("features") &"" & vbcrlf[/b]
		strList = strList & "						<p><b>Specification:</b></p>" & vbcrlf
		strList = strList & "						"& rs("specification") &"<br>" & vbcrlf
		strList = strList & "						"& strOutline2 &"<br>" & vbcrlf
		strList = strList & "					</td>" & vbcrlf
```

HELP! Vad ar det jag missar??

/A

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

## #2 — annesophie, 2002-07-30T07:34Z

\*snyft\*

Vart ar LarsG???

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

## #3 — doggelito, 2002-07-30T07:56Z

```
strList = strList & "<tr>" & vbcrlf
strList = strList & "<td colspan=""3"" class=""breadjustify"" valign=""top"">" & vbcrlf
strList = strList & strOutline & vbcrlf
strList = strList & "<p><b>Features:</b></p>" & vbcrlf
strList = strList & replace(rs("features"),highlight, "<b>" & highlight & "</b>",1,-1,1) & vbcrlf
strList = strList & "<p><b>Specification:</b></p>" & vbcrlf
strList = strList & rs("specification") & "<br>" & vbcrlf
strList = strList & strOutline2 & "<br>" & vbcrlf
strList = strList & "</td>" & vbcrlf
strList = strList & "</tr>" & vbcrlf
```

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

## #4 — annesophie, 2002-07-30T08:01Z

TACK!

![](http://www.plauder-smilies.de/remybussi.gif)

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

## #5 — doggelito, 2002-07-30T08:06Z

Alltid roligt när man kan hjälpa till! :)

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

---

Tråden på webben: https://www.webforum.nu/amne/asp/49031-nat-skumt-med-replace
