15.08.2013 Views

Ektron CMS400.NET Developer Reference Manual

Ektron CMS400.NET Developer Reference Manual

Ektron CMS400.NET Developer Reference Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Step 3: Set the Properties<br />

NOTE<br />

NOTE<br />

<strong>Ektron</strong>.Cms.Controls.Collection MyColl = new<br />

<strong>Ektron</strong>.Cms.Controls.Collection();<br />

Introduction to <strong>Ektron</strong> <strong>CMS400.NET</strong> Server Controls<br />

You can declare any server control as an object by using the server<br />

control name in the ”List of Server Controls” on page 61. Another<br />

example would be: Dim MyMdl as New MetaDataList.<br />

For descriptions of the properties and how to use them, see ”Server Control<br />

Properties in Code Behind” on page 38.<br />

After inserting the control, you can set the properties that you want<br />

to display on the page. For example:<br />

Dim MyColl as New Collection<br />

MyColl.DefaultCollectionID = 1<br />

or<br />

dim MyColl as new <strong>Ektron</strong>.Cms.Controls.Collection<br />

MyColl.DefaultCollectionID = 1<br />

With C#, use this syntax.<br />

<strong>Ektron</strong>.Cms.Controls.Collection MyColl = new<br />

<strong>Ektron</strong>.Cms.Controls.Collection();<br />

MyColl.DefaultCollectionID = 1;<br />

This line tells the page to display CollectionID 1 unless otherwise<br />

specified.<br />

If you do not know an object’s ID number, you can switch to Design mode, drag<br />

and drop the object, then use the CMS Explorer to find the ID number. (See<br />

”Using CMS Explorer to Browse Your <strong>Ektron</strong> <strong>CMS400.NET</strong> Site” on page 32.) If<br />

you do this, remember to delete the dropped object when you are done.<br />

You can also obtain the ID number via the Workarea.<br />

Dim MyColl as New Collection<br />

MyColl.DefaultCollectionID = 1<br />

MyColl.Random = True<br />

<strong>Ektron</strong> <strong>CMS400.NET</strong> <strong>Developer</strong> <strong>Reference</strong> <strong>Manual</strong>, Version 5.1, Revision 5 36

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!