paulhudson
Programmer
I am attempting to use FindControl on datarow but keep getting the following error:
Input string was not in a correct format
The column is created thus:
<code>
tpDataColumn = New DataColumn()
tpDataColumn.DataType = System.Type.GetType("System.Int32")
tpDataColumn.ColumnName = "UniqueID"
tpDataColumn.ReadOnly = True
tpDataColumn.Unique = True
tpDataColumn.AutoIncrement = True
</code>
And the find command is (error on last line):
<code>
Dim KeyID As Int32
KeyID = CType(e.Item.FindControl("UniqueID"), Label).Text
Dim foundRow As DataRow
foundRow = dtTeamPlayers.Rows.Find("KeyID")
</code>
Input string was not in a correct format
The column is created thus:
<code>
tpDataColumn = New DataColumn()
tpDataColumn.DataType = System.Type.GetType("System.Int32")
tpDataColumn.ColumnName = "UniqueID"
tpDataColumn.ReadOnly = True
tpDataColumn.Unique = True
tpDataColumn.AutoIncrement = True
</code>
And the find command is (error on last line):
<code>
Dim KeyID As Int32
KeyID = CType(e.Item.FindControl("UniqueID"), Label).Text
Dim foundRow As DataRow
foundRow = dtTeamPlayers.Rows.Find("KeyID")
</code>