Hallo!

Da! Ein, nein zwei Fehler !!!

> Imports System.ComponentModel, System.Web.UI
> 
> NameSpace jvdb
> < _
> ToolboxData("<{0}:List runat=""server""></{0}:List>"), _
> Serializable() _
> > _
>    Public Class List
>       Inherits System.Web.UI.WebControls.WebControl
> 
> #Region " Properties "
> 
>    Public Enum ListTypes As Byte
>       UL = 0
>       OL = 1
>       DL = 2
>    End Enum
> 
>    < _
>    Category("Appearance"), _
>    Description("The type of the list: unordered (UL), ordered (OL) or
> definitions (DL)") _
>    > _
>    Public Property ListType() As ListTypes
>       Get
>          Return CType(Me.ViewState("ListType"), ListTypes)
>       End Get
>       Set(ByVal Value As ListTypes)
>          Me.ViewState("ListType") = Value
>       End Set
>    End Property
> 
>    Private _Items() As String
>    < _
>    Category("Data"), _
>    Description("The items of the list seperated by pipes.") _
>    > _
>    Public Property Items() As String
>       Get
>          Return _Items.Join("|"c)
>       End Get
>       Set(ByVal Value As Collections.Specialized.StringCollection)
>          _Items = Value.Split("|"c)
>       End Set
>    End Property
> 
> #End Region
> #Region " Overrides "
> 
>    Protected Overrides Sub RenderContents(ByVal output As
> System.Web.UI.HtmlTextWriter)
>       Dim counter As Integer = 0
>       output.AddAttribute("id", Me.ID)
>       If Not Me.CssClass Is Nothing Then output.AddAttribute("class",
> Me.CssClass)
>       Select Case CType(Me.ViewState("ListType"), ListTypes)
>          Case ListTypes.UL : output.RenderBeginTag("ul")
>          Case ListTypes.OL : output.RenderBeginTag("ol")
>          Case ListTypes.DL : output.RenderBeginTag("dl")
>       End Select
>       Dim item As Collections.Specialized.StringEnumerator =
> _Items.GetEnumerator

^^^^^^ Die Zeile muss raus. Ich hab der Einfachheit halber das Property als
String deklariert.
Da brauchts dann keinen zus�tzlichen Designer.

>       For Each item As String in _Items
>          Select Case CType(Me.ViewState("ListType"), ListTypes)
>             Case ListTypes.UL, ListTypes.OL
>                output.RenderBeginTag("li")
>             Case ListTypes.DL
>                If counter Mod 2 = 0 Then
>                   output.RenderBeginTag("dt")
>                Else
>                   output.RenderBeginTag("dd")
>                End If
>                counter += 1
>          End Select
>          output.Write(item)
>          output.RenderEndTag()
>       Next
>       output.RenderEndTag()
>    End Sub
> 
> #End Region
> 
> End Class

End Namespace

^^^^^^. Und das hat noch gefehlt

Freundliche Gr��e
Joachim van de Bruck

_______________________________________________
Asp.net mailing list
[EMAIL PROTECTED]
http://www.glengamoi.com/mailman/listinfo/asp.net

Antwort per Email an