---
title: "Encoding i Codebehind"
type: "forum-thread"
url: "https://www.webforum.nu/amne/dotnet/129462-encoding-i-codebehind"
topic: ".NET"
topic_url: "https://www.webforum.nu/amne/dotnet"
author: "Arne"
published: "2005-06-05T10:58:45.000Z"
updated: "2005-06-05T11:45:18.000Z"
replies: 2
views: 211
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/dotnet/129462-encoding-i-codebehind"
---

# Encoding i Codebehind

## #1 — Arne, 2005-06-05T10:58Z

Denna FolderNameEncoding fungerade fint när jag inte använde Codebehind.

```
Dim imap As New IMAP4("123.123.1.2")
imap.FolderNameEncoding = Encoding.GetEncoding("ISO-8859-1")
```

Nu har jag converterat till Codebehind och får detta fel som jag inte får till.

BC30451: Name 'Encoding' is not declared.

Hur declarerar jag Encoding i Codebehind?

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

## #2 — renholm, 2005-06-05T11:42Z

Du måste "importera" System.Text:

```
imports System.Text
```

Alternativt använda System.Text.Encoding.GetEncoding("ISO-8859-1") direkt.

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

## #3 — Arne, 2005-06-05T11:45Z

det funkade

det fungerade perfekt, tack för hjälpen......

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

---

Tråden på webben: https://www.webforum.nu/amne/dotnet/129462-encoding-i-codebehind
