---
schema_version: "1"
id: d3c30c3f75f8417d2b680a952418c39daa653d67048a8a8d766792fd0fb06736
title: apex:scontrol
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/salesforce-pages-developers-guide/guides/pages/components/pages-compref-scontrol.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/guide/pages-compref-scontrol.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 2f98a0c1749217829b04011fd75bc04dcfa6626ff4c90d3b54710204018efd60
products:
  - Visualforce Developer Guide
  - Platform Developer Content
---

# apex:scontrol

An inline frame that displays an s-control.

Note: **s-controls have been superseded by Visualforce pages**. After March 2010 organizations that have never created s-controls, as well as new organizations, won't be allowed to create them. Existing s-controls remain unaffected.

## Example

```apex
<!-- For this component to work, you must have a valid s-control defined. -->
<apex:page>
    <apex:scontrol controlName="HelloWorld" />
</apex:page>
```

## Attributes

|Attribute Name|Attribute Type|Description|Required?|API Version|Access|
|--------------|--------------|-----------|---------|-----------|------|
|`controlName`|String|The name of the s-control displayed. For this value, use the s-control's name field, not its label.| |10.0|global|
|`height`|Integer|The height of the inline frame that should display the s-control, expressed either as a percentage of the total available vertical space (for example height="50%"), or as the number of pixels (for example, height="300px").| |10.0|global|
|`id`|String|An identifier that allows the s-control component to be referenced by other components in the page.| |10.0|global|
|`rendered`|Boolean|A Boolean value that specifies whether the component is rendered on the page. If not specified, this value defaults to true.| |10.0|global|
|`scrollbars`|Boolean|A Boolean value that specifies whether the s-control can be scrolled. If not specified, this value defaults to true.| |10.0|global|
|`subject`|Object|The ID of the record that should provide data for this s-control.| |10.0|global|
|`width`|Integer|The width of the inline frame that should display the s-control, expressed either as the number of pixels or as a percentage of the total available horizontal space. To specify the number of pixels, set this attribute to a number followed by px, (for example, width="600px"). To specify a percentage, set this attribute to a number preceded by a hyphen (for example width="-80").| |10.0|global|

