My code requires to get the control name in user control Load event, problem is i get the control name in assembly, not the name i assign in the form, but if i run the project i get the control name properly.
To test, just add following code to any user control
Private Sub GridX_Load(sender As Object, e As EventArgs) Handles MyBase.Load
MsgBox(Me.Name)
End Sub
At runtime this gives ControlName1
At design time this gives ControlName
how can I get the ControlNameX
at runtime?
To make it more clear, add two controls in the form, you will see that name of the control in design mode are the same.. unlike in runtime mode..