Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
ASP.NET Reference
Client Reference
Sys.UI Namespace
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Sys.UI.Control Class

Provides the base class for all ASP.NET AJAX client controls.

Namespace: Sys.UI

Inherits: Sys.Component

var a = new MyControl(element);

Name

Description

Sys.UI.Control Constructor

When called from a derived class, initializes a new instance of that class.

Name

Description

Sys.UI.Control addCssClass Method

Adds a CSS class to the HTML Document Object Model (DOM) element that the current Control object is associated with.

Sys.UI.Control dispose Method

Removes the current Control object from the application by releasing all associated resources and freeing the memory used by the control.

Sys.UI.Control initialize Method

Initializes the current Control object.

Sys.UI.Control onBubbleEvent Method

Called when an event is raised by the raiseBubbleEvent method.

Sys.UI.Control raiseBubbleEvent Method

Calls the onBubbleEvent method of the parent control.

Sys.UI.Control removeCssClass Method

Removes a CSS class from the DOM element that the current Control object is associated with.

Sys.UI.Control toggleCssClass Method

Toggles a CSS class on the DOM element that the current Control object is associated with.

Sys.UI.Control element Property

Gets the DOM element that the current Control object is associated with.

Sys.UI.Control id Property

Gets or sets the identifier for the current Control object.

Sys.UI.Control parent Property

Gets or sets the parent control for the current Control object.

Sys.UI.Control visibilityMode Property

Gets or sets the Sys.UI.VisibilityMode value for the current Control object.

Sys.UI.Control visible Property

Gets or sets the visibility of the current Control object.

Sys.UI.Control is a base class and should not be instantiated directly. For information about how to create a control that inherits from Sys.UI.Control, see Creating Custom AJAX Client Controls.

NoteNote:

Instances of any class derived from Sys.UI.Control cannot be attached to a Label element in the Opera browser.

Reference

Other Resources

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
I think there is a bug in the Sys.UI.Control      Miroslav Sekera ... Noelle Mallory - MSFT   |   Edit   |   Show History

Hi,

I took the sample how to create control that itherits from Sys.UI.Control here

http://asp.net/AJAX/Documentation/Live/tutorials/CreatingCustomClientControlsTutorial.aspx

and I modified the script so that it contains a default value for the "id" property, according to the sample here

http://asp.net/AJAX/Documentation/Live/ClientReference/Sys/ComponentClass/ComponentCreateMethod.aspx

$create(Demo.HoverButton, {id:'testId',text: 'A HoverButton Control',element: {style: {fontWeight: "bold", borderWidth: "2px"}}}, {click: start, hover: doSomethingOnHover, unhover: doSomethingOnUnHover},null, $get('Button1'));

you can find the whole code I used at

http://www.ninebytes.com-a.googlepages.com/DemoHoverButton.aspx.htm
http://www.ninebytes.com-a.googlepages.com/HoverButton.js.htm

or ZIPped
http://www.ninebytes.com-a.googlepages.com/DemoHoverButton.zip

However, I am getting an error "Sys.InvalidOperationException: Operation is not vallid due to the current state of the object."

I think this must be a bug in the framework, as the code is according to the documentation.

Or, does anyone know about another way how to set the "id" property of the control?

(Sys.UI.Behavior works fine)

best regards

Miroslav

[Noelle Mallory - MSFT] Please post questions to the MSDN Forums at http://forums.microsoft.com/msdn. You will likely get a quicker response through the forum than through the Community Content.

Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker