31.10.2014 Views

Developer's Guide - EPiServer World

Developer's Guide - EPiServer World

Developer's Guide - EPiServer World

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

110 | Developer’s <strong>Guide</strong> <strong>EPiServer</strong> Community 3.1<br />

<br />

<br />

...<br />

<br />

File: <br />

Name: <br />

Description:<br />

<br />

<br />

Adding a video is done via the VideoGalleryHandler.AddVideo(Video) method. In the codebehind below we show how<br />

it’s called when the UploadButton.Click event is fired.<br />

Import Necessary Namespaces<br />

First import the necessary namespaces that will be used to manage video galleries. The namespaces<br />

StarCommunity.Modules.VideoGallery, StarCommunity.Core, StarCommunity.Core.Modules and<br />

StarCommunity.Core.Modules.Security are described by clicking on their names. Make sure you add the assemblies as a<br />

reference, mentioned in Setting up Visual Studio.<br />

using StarCommunity.Core;<br />

using StarCommunity.Core.Modules;<br />

using StarCommunity.Core.Modules.Security;<br />

using StarCommunity.Modules.VideoGallery;<br />

© <strong>EPiServer</strong> AB

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

Saved successfully!

Ooh no, something went wrong!