I'm sorry, but I don't understand what you are asking.
Textbox has a Name property. When you drag a Textbox onto a form, a name gets assigned to it ("Textbox1," "Textbox2," etc). However, creating a textbox via code will not automatically assign a name to it. Are you asking how to assign a name to it You can set the name property.
me.name
mentally_disturbed
Dim a As Textbox
Dim i As Integer = 0
For i = 0 To 100
a = New Textbox()
a.Text = i.ToString()
Me.Controls.Add(a)
Next
I don't think that it is possible to do what you are asking.
Is this Web Development
staceywilliam
Dim ns, nsn As String
ns = Me.GetType().BaseType.Namespace
it works also for any object
I shall find it
thanks anyway
Yevgeniy K
Textbox has a Name property. When you drag a Textbox onto a form, a name gets assigned to it ("Textbox1," "Textbox2," etc). However, creating a textbox via code will not automatically assign a name to it. Are you asking how to assign a name to it You can set the name property.
tosun
I name it as Follow :
textBox1 as TextBox
I want to get "textBox1" as a string
if you add dynamicly many controls you need for client side an ID
Why shoul I do
textBox1 as TextBox
textBox1.ID = "TextBox1"
when I have allready it, I just want to get it as string
something like
Private Function GetNameType(ByVal o As Object) As String
Return o.GetType.Name.ToString
End Function
but getting the name itself not the type name
thank you