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.

NOTE<br />

3. Set the DefaultCollectionID property.<br />

4. Drag and drop a Textbox on the Web form.<br />

5. Set the TextMode property to MultiLine.<br />

It is also recommended that you set the width of the text box to at least 400px.<br />

6. On the code behind page, add the following line.<br />

Textbox1.Text = Collection1.XmlDoc.InnerXml<br />

7. Build the project.<br />

8. View the Web form in a browser.<br />

9. The XML structure of the collection appears in the textbox.<br />

Using the Collection Server Control<br />

Programmatically Example<br />

NOTE<br />

The following is an example of using code behind, and a drag and<br />

drop Collection Server Control to display random content from a<br />

collection.<br />

1. Drag and Drop a Collection Server Control on your Web form.<br />

2. Set the properties in the properties window.<br />

In this example, the Random property and the GetHtml property must be set to<br />

True.<br />

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

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

Saved successfully!

Ooh no, something went wrong!