Author: TRU | Posted on: 7/26/2009 6:39:15 AM | Views : 1024

 All to often I find myself spending what seems to be way to much time trying to debug what should be simple.  Most of the time it appears that it is a matter of needing to find the control in a table or some type of container.
What is a simple way to find controls in code behind using VB?
Below is a simple example that when I place in a code behind with controls in a plain form I have no problems.  But once I put controls within a table or other container div the application breaks.
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim a As Integer Dim b As Integer Dim n As Decimal a = TextBox1.Text b = TextBox2.Text n = a + b Label1.Text = n End Sub
 
Can somebody direct me on how to find these controls.
Seems like VS2008 should do a better job of finding ...

Go to the complete details ...