This documentation is archived and is not being maintained.

ImageButton Constructor

Initializes a new instance of the ImageButton class.

[Visual Basic]
Public Sub New()
[C#]
public ImageButton();
[C++]
public: ImageButton();
[JScript]
public function ImageButton();

Remarks

Use this constructor to create and initialize a new instance of the ImageButton class.

Example

The following example demonstrates how to create and initialize a new instance of the ImageButton class.

[Visual Basic] 
Sub Page_Load(sender As Object, e As EventArgs)
    Dim img_button As New ImageButton()
End Sub


[C#] 
void Page_Load(Object sender, EventArgs e) 
{
   ImageButton img_button = new ImageButton();
}
   

[C++] 
void Page_Load(Object* /*sender*/, EventArgs* /*e*/)
{
   ImageButton* img_button = new ImageButton();
}


[JScript] 
function Page_Load(sender : Object, e : EventArgs){
    var img_button : ImageButton = new ImageButton()
}

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

ImageButton Class | ImageButton Members | System.Web.UI.WebControls Namespace

Show: