# Converting Create/Edit Modal to Page In this document we will explain how to convert BookStore's `Books` create & edit modals to regular razor pages. ## Before ![before](images/old.gif) ## Now ![after](images/new.gif) ## Index page Repalce `abp-button(NewBookButton)` buttom with ` @L["NewBook"].Value`. ## Index js file Remove the related codes of `createModal` and `editModal`. Change the `Edit row action` with `location.href = "/Books/EditModal?id=" + data.record.id;` ## Create/Edit Book page Remove `Layout = null;` and add some custom style and javascript code to `CreateModal.cshtml` & `EditModal.cshtml`. ```csharp @section styles { } @section scripts { } ``` Add a `div` element with `abp-view-modal` class to wrap the `abp-dynamic-form`, Set size of `abp-modal` to `ExtraLarge` and remove the `AbpModalButtons.Cancel` button from `abp-modal-footer`. ### CreateModal ```csharp
``` ### EditModal ```csharp
``` You can check this Git commit for details. https://github.com/abpframework/abp-samples/commit/f3014e0ec422cb2d8816d0e00dd6ab9cc1adfc21