Share via


Setting Control Properties with the PARAM Tag

Windows Media Player SDK banner art

One way to set the properties of a control in a Web page is to add PARAM tags between the OBJECT tags. This method is ideal for setting properties at design time. The following code shows you the OBJECT tag with some PARAM tags added.

<OBJECT ID="MediaPlayer1" WIDTH=320 HEIGHT=240
  CLASSID="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95"
  STANDBY="Loading Windows Media Player components..."
  TYPE="application/x-oleobject">

  <PARAM NAME="FileName" VALUE="C:\ASFRoot\Welcome.asf">
  <PARAM NAME="ShowControls" VALUE="False">
  <PARAM NAME="AutoRewind" VALUE="True">
  <PARAM NAME="AutoStart" VALUE="False">
</OBJECT>

The PARAM tags used in the preceding example have two attributes: the first is the name of the property being set, and the second specifies the value of the property. In the previous example, the first PARAM tag sets the FileName property to C:\ASFRoot\Welcome.asf. The remaining PARAM tags initialize the values of the AutoRewind property to true, the ShowControls property to false, and the AutoStart property to false.