About the Image Gallery
The DevExpress ASP.NET MVC ImageGallery extension displays image collections using a tabular layout with dynamic layout adaptation, an integrated pager and a built-in image slider.
Follow the three simple steps below to add a DevExpress ImageGallery extension and bind it to your data. It's easy as “M”, “V”, and “C”:
1. Model (the "M" in MVC). First, you will need a Model object for the DevExpress ImageGallery to bind to. Create a new data model using the Entity Framework wizard or LinqToSQL ORM from Visual Studio. However, you can use any model that supports the IEnumerable interface. You can also bind the ImageGallery to a folder within your project.
2. View (the "V" in MVC). Now, you will declare the ImageGallery extension inside of the View. Specifically, you will create a Partial View because the DevExpress ImageGallery extension provides AJAX callbacks by default, to give your end-users a better experience without updating the entire page. However, because ASP.NET MVC does not support callbacks, declare the ImageGallery extension inside of a Partial View and define how the callbacks will be routed back to your controller using the CallbackRouteValues property:
Partial View code:
3. Controller (the "C" in MVC). Finally, the controller is where you will need to define the action methods that will handle the ImageGallery callbacks. The "OverviewPartial" action method below handles the callbacks. As you can see, the native DevExpress ImageGallery extension follows the ASP.NET MVC pattern while providing powerful features for your end-users.