Working with IE Web Controls for the first time and I'm having a hard time. I am using the code from the following URL:
but I moved the actual code to the code behind page.
Here's the error:
Object reference not set to an instance of an object.
Line 51: pnl = CType(FindControl("pnl" & i.ToString), Panel)
Line 52: If mytabstrip.SelectedIndex = i Then
Line 53: pnl.Visible = "True" ******this is where it's bombing out
Line 54: Else
Line 55: pnl.Visible = "False"
Here is the full subroutine
Dim i As Integer
Dim pnl As Panel
'Makes each Panel Visible or Invisible, depdending on which Tab is clicked.
For i = 0 To 4
Dim s As String
s = i.ToString
pnl = CType(FindControl("pnl" & i.ToString), Panel)
If mytabstrip.SelectedIndex = i Then
pnl.Visible = "True"
pnl.Visible = "False"
and here's the panel tag
<asp:panel ID="pnl0" Height="100" BorderWidth="2" Visible="False" Runat="server">
I know this is probably kind of elementary but I'm stumped.