I have a page with a master page. This page has an HTML table and inside that table (no runat server! tag for the table) I have a bunch of RadnumericTextbox controls named tbx1, tbx2, through tbxn.
I want to iterate through these, but when I use the findcontrol method, I get an "Object Reference not set to an instance of an object" error. So i tried to get the value of just one named "tbx1" - still getting the rror
Here is the code I use to test with one control:
telerik:RadNumericTextBox ID="tbx1" Runat="server"
Culture="English (United States)" DataType="System.Int16" MaxValue="400"
MinValue="0" ShowSpinButtons="True" Width="35px">
<NumberFormat DecimalDigits="0" />
Function CollectAnswer() as string
strResult As String = ""
Dim tbox As RadNumericTextBox
tbox = CType(Page.FindControl("tbx1"), RadNumericTextBox)
strResult = tbox.Text
I have also tried
tbox = Me.FindControl("tbx1") as the third line, same results
with the same results.
I get no errors in VS.