Check that the TextBox has
runat="server"
in it's HTML:
<asp:TextBox ID="textbox1" Columns="2" MaxLength="3" Text="1" runat="server"/>
The
ID
will need to match the name you use in the C# code.
The Panel will need the same, but you will also need to access it's Controls collection, and remember that C# is case sensitive: "control" is not the same as "Control":
foreach (Control ct in panel.Controls)
And by the way: "It's not working" is one of the most useless problem descriptions we get: it tells us absolutely nothing about the problem. We don't know if you get an error message, or the wrong data, or even that that code compiles successfully!
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with.
So tell us what happens when you run that code, what you expected to happen, how you checked what happened. Help us to help you!