hi, I have a problem with Operator '&'
someone may help me with this problem. thank u :)

Protected Overloads Overrides Sub Render(ByVal writer As HtmlTextWriter)
        If String.IsNullOrEmpty(Name) Then
            Throw New NullReferenceException("Name must be set on a widget")
        End If

        Dim sb As New StringBuilder()

        [B]sb.Append(("<div class=""widget " & Me.Name.Replace(" ", String.Empty).ToLowerInvariant() & """ id=""widget") + WidgetID & """>")

                  sb.Append(("<a class=""delete"" href=""javascript:void(0)"" onclick=""BlogEngine.widgetAdmin.removeWidget('" & WidgetID & "');return false"" title=""") + Resources.labels.delete & " widget"">X</a>")
 [/B]

The concatenation character in VB.NET is the "+", not the "&". Use the "+" instead.

Don't use +. Use & to concatenate strings.

sb.Append(("<div class=""widget " & Me.Name.Replace(" ", String.Empty).ToLowerInvariant() & """ id=""widget") & WidgetID.ToString() & """>")

sb.Append(("<a class=""delete"" href=""javascript<b></b>:void(0)"" onclick=""BlogEngine.widgetAdmin.removeWidget('" & WidgetID.ToString() & "');return false"" title=""") & Resources.labels.delete & " widget"">X</a>")
This question has already been answered. Start a new discussion instead.