---
title: "Html - ASP Converter"
type: "forum-thread"
url: "https://www.webforum.nu/amne/asp/45874-html-asp-converter/page2"
topic: "ASP"
topic_url: "https://www.webforum.nu/amne/asp"
author: "Jesper T"
published: "2002-06-13T23:59:20.000Z"
updated: "2002-06-16T13:48:38.000Z"
replies: 22
views: 658
page: 2
pages: 2
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/45874-html-asp-converter"
---

# Html - ASP Converter

_Sida 2 av 2._

## #21 — Jesper T, 2002-06-15T16:15Z

Tack så länge!!

 :)

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

## #22 — Jesper T, 2002-06-15T16:31Z

```
<% 
textfield=request.form("textfield")
send=request.querystring("send")
totalchar=request("totalchar")
response.write " <html><head"&_
"><title>HTML-ASPConverter Ver 1.1</title> <meta http-equiv='Content-Type' content='text/"&_
"html; charset=iso-8859-1'></head><body bgcolor='#FFFFFF' text='#000000'>" 
response.write "<!-- &copy; Inovart 2002 All rights reserved --><b>HTML - ASP Converter 1.1</b><br><br>Htmlcode<form name='form1' method='post' action='translate.asp?send=yes'>"&_
"<textarea name='textfield' cols='40' rows='5'>"&textfield&"</textarea><br>"&_
"<br>Characters before linefeed<br><select name='totalchar'><option>50</option><option>100</option><option>150</option> <option>200</option></select>"&_
"<br><input type='submit' name='Submit' value='Translate'><INPUT TYPE='button' VALUE='Reset form' onClick=""top.location='translate.asp'""></form><br><br>--------------------------------------------------------------------------------------------------------<br><br>"

'bryter av raden efter ett visst antal tecken
Function br(str)
	Dim antal, tecken, count
	antal = cint(totalchar) 'Antal tecken som raden skall vara.[totalchar]

	for tecken = 1 to len(str)
	     count = count + 1
	     Response.Write Mid(str, tecken, 1)
	     If count > antal Then Response.Write "<font color='#993333'>&quot;</font><font color='#000000'>&amp;_</font><BR><font color='#993333'>&quot;</font>": count = 0
	next
End Function
asptext = replace(textfield,"""","'")
asptext = replace(replace(asptext, "<","&lt;"),">","&gt;")
asptext = replace(asptext,"å","&amp;aring;")
asptext = replace(asptext,"ä","&amp;auml;")
asptext = replace(asptext,"ö","&amp;ouml;")
asptext = replace(asptext,"Å","&amp;Aring;")
asptext = replace(asptext,"Ä","&amp;Auml")
asptext = replace(asptext,"Ö","&amp;Ouml;")
text="<b>ASP:</b><br><br><font color='#993333'>&lt;% Response.write &quot;</font><font color='#009900'>"& asptext &"</font>"
if send ="yes" then
if len(text)>200 then
response.write br(text)
else
strbryt = Replace(text, vbCrLf, "&lt;br&gt;")
response.write strbryt 
end if

Response.write "<font color='#cccccc'>&lt;!--// &copy; Inovart 2002 --&gt;</font><font color='#993333'>""</font><font color='#993333'> %&gt;</font><br><br><b>&copy; Inovart 2002</b>"
end if
Response.write "</body></html>"

%>
```

Är det någon som har ett tips om hur det inte skall delas i ett ord?!

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

## #23 — Jesper T, 2002-06-16T13:48Z

Har hittat ett litet program för det på nätet.
Om ngn skulle vara intresserad.

[HTML to ASP Converter](http://xirx.com/htoa/)

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

---

Tråden på webben: https://www.webforum.nu/amne/asp/45874-html-asp-converter/page2  
Föregående sida: https://www.webforum.nu/amne/asp/45874-html-asp-converter.md
