The quick start guides you through the steps of adding a Menu control to your application. For information on how to add ASP.NET MVC Edition controls , see Adding Controls.
Follow the steps given below to get started:
Create a new MVC application using the ComponentOne or VisualStudio templates. For more information about creating an MVC application, see Configuring your MVC Application topic.
Add a new Controller:
Default1Controller
).Add a View for the controller:
Default1Controller
) to open it.Index()
.Index.cshtml
to open it.Index.cshtml
file with the code given below to initialize a Menu control.
HTML |
Copy Code
|
---|---|
<label>ItemClicked Event</label> <c1-menu header="File" on-client-item-clicked="itemClicked"> <c1-menu-item header="New"></c1-menu-item> <c1-menu-item header="Open"></c1-menu-item> <c1-menu-item header="Save"></c1-menu-item> <c1-menu-item is-separator=true></c1-menu-item> <c1-menu-item header="Exit"></c1-menu-item> </c1-menu> |