We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Set Dialog control default to false

Thread ID:

Created:

Updated:

Platform:

Replies:

131090 Jun 20,2017 01:18 AM Jun 22,2017 02:51 AM ASP.NET Web Forms 3
loading
Tags: Dialog
Imre Revesz
Asked On June 20, 2017 01:18 AM

Hello!

I have a C# based website, where I have started to use the Syncfusion asp.net Dialog control. (www.recognitiongame.com)

My problem:
I set the default behaviour of the Dialog Control with ShowOnInit(false).
But when the page loads, the dialog blink for a moment. It's annoying.

How can I set the Dialog opening, showing false by default?
(Visible="false" not good, because I can't set back by jquery.)

Thanks,
 Imre

Arun Palaniyandi [Syncfusion]
Replied On June 21, 2017 08:29 AM

 
Hi Imre Revesz,  
Thanks for contacting Syncfusion support.  
We can achieve this scenario by setting the style attribute for Dialog’s parent element as, display none in the code behind. Hence this will not show the Dialog content blink and display Dialog, only when we open it. Please find the below code snippet for you reference.  
  
  
        <div id="Dialog" runat="server">  
        <ej:Dialog ID="basicDialog" ShowOnInit="false" IsResponsive="True" Width="550"MinWidth="310px" MinHeight="215px" ClientSideOnClose="onDialogClose"Containment=".control" runat="server" Title="Audi Q3 Drive">  
              //Something  
        </ej:Dialog>  
  
         </div>  
  
Code behind:  
  
protected void Page_Load(object sender, EventArgs e)  
        {  
            this.Dialog.Style.Add("display", "none");  
        }  
  
  
  
  
Please find the below sample for your reference.  
Please check the shared sample and if the sample still not meet your requirement, please send us more information so that we will provide a solution.          
Regards,          
Arun P.      


Imre Revesz
Replied On June 21, 2017 04:22 PM

Hi!

Thanks, it works perfectly.


Regards,

 Imre


Arun Palaniyandi [Syncfusion]
Replied On June 22, 2017 02:51 AM

Hi Imre, 

We are glad that our solution has helped you out. 

Please let us know if you have any queries in future. 

Regards, 
Arun P. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;