Spread Windows Forms 9.0 Product Documentation
Name Property (ElementControl)


Gets or sets the name used in code to identify the control.
Syntax
'Declaration
 
Public Shadows Property Name As String
'Usage
 
Dim instance As ElementControl
Dim value As String
 
instance.Name = value
 
value = instance.Name
public new string Name {get; set;}

Property Value

String containing the name of the control
Remarks

The name of a control must start with a letter and can contain a maximum of 40 characters. It can include numbers and underscore characters, but it cannot include punctuation or spaces. Different controls used on the same form cannot share the same name.

Notes:
  • Although some controls use the Name property value as the default value for the Text property, changing either property does not affect the other.
  • For more information, see the Name property in the Microsoft .NET Framework Reference.

You cannot change the name of a control at run time.

Note: Changing the name of a control can affect existing code that uses the name.
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

ElementControl Class
ElementControl Members
Text Property

 

 


Copyright © GrapeCity, inc. All rights reserved.