---
title: Create MVC component
slug: cms-13/docs/create-mvc-component
docTags: 
createdAt: 2026-07-30T20:22:10.689Z
---

The Optimizely Content Management System (CMS) extension of the `IFrameComponent` has the following additional parameters:

- `UrlFromUtil` – Optional. The URL to the source, relative to the `Utils` folder. Used instead of `Url` property.
- `UrlFromUi` – Optional. The URL to the source, relative to the `UI` folder. Used instead of `Url` property.

First, add a controller. Annotate the controller with an `IframeComponent` attribute.

```csharp
[IFrameComponent(Url = "/helloworld", Title = "Hello World Component", Categories = "content")]
public class HelloWorldController: Controller {
  public ActionResult Index() {
    return View();
  }
}
```

Then add an `Index.cshtml` view to the `Views/HelloWorld` directory:

```cshtml
@{
   Layout = null;
}
    
<!DOCTYPE html>
<html>
  <head>
    <meta name="viewport" content="width=device-width" />
    <title>HelloWorld</title>
  </head>
  <body>
    <div>
      <div>Hello World</div>
    </div>
  </body>
</html>
```
