Hi Hrvoje Voda,
Thanks for Contacting Syncfusion support.
We have analyzed your queries and prepared a sample as per your requirement.
How to make backgorund of primary page disabled? It doesn't have to be black just that client cannot click over page until dialog is closed.
We can achieve your requirement by using our existing modal dialog property to be set as EnableModal=”true”. To avoid the blackbackground you need to override the default CSS. Please refer the code example.
Query 2: How to close that dialog with button on web page?
As from your first query we cannot access anything behind the dialog. So we cannot use the close button in the webpage you have. Instead you can use close button in the dialog panel.
<ej:Dialog ID="basicDialog" Title="Login Form" ClientSideOnClose="onDialogClose" EnableModal="true" EnableResize="false" runat="server" >
<%--place your contents here.--%>