VB.NET:
Public Sub DrawBoard()
'---used to store the location of the cell---
Dim location As New Point
'---draw the cell---
For row As Integer = 1 To 9
For col As Integer = 1 To 9
location.X = col * (CellWidth + 1) + xOffset
location.Y = row * (cellHeight + 1) + yOffset
Dim lbl As New Label
With lbl
.Name = col.ToString() & row.ToString()
.BorderStyle = BorderStyle.Fixed3D
.Height = cellHeight
.Width = CellWidth
.BackColor = DEFAULT_BACKCOLOR
.Location = location
.Tag = "1"
AddHandler lbl.Click, AddressOf Cell_Load
End With
[COLOR="Red"]Me.Controls.Add(lbl)[/COLOR]
Next
Next
End Sub
can someone help me how to solve the problem... I'm new to vb.net the error msg is "Value of type 'System.Windows.Forms.Label' cannot be converted to 'System.Web.UI.Control' " what i need to do to make it work? By the way sorry if i post at the wrong thread.