---
title: "Problem med webcontrol"
type: "forum-thread"
url: "https://www.webforum.nu/amne/dotnet/94282-problem-med-webcontrol"
topic: ".NET"
topic_url: "https://www.webforum.nu/amne/dotnet"
author: "Jon"
published: "2004-01-08T19:49:51.000Z"
updated: "2004-01-08T21:43:03.000Z"
replies: 1
views: 200
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/94282-problem-med-webcontrol"
---

# Problem med webcontrol

## #1 — Jon, 2004-01-08T19:49Z

Jag får ingen ordning på hur detta fungerar.
Har en webcontrol som naturligtvis ärver av WebControl.

Om jag håller mupekaren över raden

```
Me.Page.Application(WebChartImageStream.ChartNamePrefixInApplication & sControlName) = Me
```

i VB.NET så säger den att Application är
*Public Default Property Item(name as string) As Object*

Gör jag samma sak i c# över

```
this.Page.Application(ChartImageStream.ChartNamePrefixInApplication + sControlName) = this;
```

så får jag att:
*System.Web.HTTPApplicationState Page.Application, Get sthe Application object for the current web request*

Har jag översatt det fel till c# eller får jag tag på helt olika saker?

Bra länkar och boktips i ämnet är också hjärtligt välkomna :)

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

## #2 — Jon, 2004-01-08T21:43Z

Löste problemet.

Naturligtvis ska det vara

```
this.Page.Application[ChartImageStream.ChartNamePrefixInApplication + sControlName] = this;
```

Eftersom det är frågan om en collection av applikationer som man söker upp sin egen i

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

---

Tråden på webben: https://www.webforum.nu/amne/dotnet/94282-problem-med-webcontrol
