B
Billy
I am creating a web application with VB.NET 2003. On one
page I have a data grid with all databound columns which
displays correctly and the editing feature does bring up
the textboxs in the grid when I click.
My problem is that for some reason, I cannot declare a
textbox. When following microsofts code:
Dim upoff As TextBox
I get this error:
C:\Inetpub\wwwroot\WebApplication1\signoff.aspx.vb
(179): 'TextBox' is ambiguous, imported from the
namespaces or types 'System.Windows.Forms,
System.Web.UI.WebControls'.
when I try to declare it such as this:
Dim up1 As String = CType(e.Item.Cells(6).Controls(0),
Web.UI.WebControls.TextBox).Text
it does compile without error, however it tells me:
Specified cast is not valid
at this line:
Dim up1 As String = CType(e.Item.Cells(6).Controls(0),
Web.UI.WebControls.TextBox).Text
I have no clue what I am doing wrong. The rest of the
site seems to be working, I just cannot upgrade this grid
no matter whos code I follow.
page I have a data grid with all databound columns which
displays correctly and the editing feature does bring up
the textboxs in the grid when I click.
My problem is that for some reason, I cannot declare a
textbox. When following microsofts code:
Dim upoff As TextBox
I get this error:
C:\Inetpub\wwwroot\WebApplication1\signoff.aspx.vb
(179): 'TextBox' is ambiguous, imported from the
namespaces or types 'System.Windows.Forms,
System.Web.UI.WebControls'.
when I try to declare it such as this:
Dim up1 As String = CType(e.Item.Cells(6).Controls(0),
Web.UI.WebControls.TextBox).Text
it does compile without error, however it tells me:
Specified cast is not valid
at this line:
Dim up1 As String = CType(e.Item.Cells(6).Controls(0),
Web.UI.WebControls.TextBox).Text
I have no clue what I am doing wrong. The rest of the
site seems to be working, I just cannot upgrade this grid
no matter whos code I follow.