# Open existing page as dialog from Main Layout button click - fail

**URL:** <https://forum.radzen.com/t/open-existing-page-as-dialog-from-main-layout-button-click-fail/5478>\
**Category:** Blazor Server\
**Created:** [October 29, 2020, 9:55pm UTC](https://forum.radzen.com/t/open-existing-page-as-dialog-from-main-layout-button-click-fail/5478 "2020-10-29T21:55:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamesmd2](https://forum.radzen.com/letter_avatar_proxy/v4/letter/j/8797f3/32.png) [@jamesmd2](https://forum.radzen.com/u/jamesmd2)\
**Post date:** [October 29, 2020, 9:55pm UTC](https://forum.radzen.com/t/open-existing-page-as-dialog-from-main-layout-button-click-fail/5478/1 "2020-10-29T21:55:44Z")

</div>

Hi guys,

I had this issue in another project. To confirm, I created a new project (Radzen 2.54.5) with 2 pages.  
"Home" as landing page, and "DialogOrNot" for testing. Both pages were created as empty and only have a title.

I have modified the Main layout and added a button that is to be used to open the DialogOrNot page in a dialog. ![image](https://forum.radzen.com/uploads/default/original/2X/1/140a2b9f472107657a10d5618304fbfb20250c37.png)

I then configured the Click event to open DialogOrNot as a dialog.

 ![image](https://forum.radzen.com/uploads/default/original/2X/e/e056196380e546b58bf672f33bdb62488a293ee7.png)

When clicking Done, the following error message is displayed:

 ![image](https://forum.radzen.com/uploads/default/original/2X/7/708738c13442cc9b2f88df9b5948065a15a89999.png)  
and this is after Radzen was able to find it and offer it for a dialog page 🙂

Checking the generated code shows that the layout has no knowledge of the specific page

 ![image](https://forum.radzen.com/uploads/default/original/2X/7/7c25205005d23f66a5b85f1d38efcda1ceeea40d.png)

Of course, I was able to add a _using project.Pages_ namespace to the generated code and run using Visual Studio successfully. Not ideal as I'd like to use Radzen and not a workaround.

Expected or error?

thanks,  
Miles

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [October 30, 2020, 7:36am UTC](https://forum.radzen.com/t/open-existing-page-as-dialog-from-main-layout-button-click-fail/5478/2 "2020-10-30T07:36:27Z")

</div>

Hi @jamesmd2,

Thank you for reporting this issue! We will fix it with the next Radzen release
