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.

How to avoid the Flashing or popping effect during control rendering in ASP and MVC platforms?

How to avoid the Flashing or popping effect during control rendering in ASP and MVC platforms

 

Cause:

In our ASP.NET and ASP.NET MVC platform, the controls are rendered using tag helpers. During rendering of our controls, these tag helpers get serialized to generate a script which actually renders the control using JavaScript. Since our controls are JavaScript based controls. Now during this process, there is a delay between the tag helpers being serialized and controls being rendered using the generated script. This is delay causes the control to appear flashing or popping from native HTML elements.

 

Solution:

To avoid this flashing or popping from HTML elements effect, a new <div> element can be added to contain the control, with its CSS visibility property set to hidden. Now the control will not be visible in DOM during rendering. Once the control render completes, the create event of the same control can be used to set the visibility property of the <div> element to visible from hidden. Thus, avoiding the controls from being flashing from the HTML elements.

 

Refer to the following example in the ASP.NET WebForms platform,

[ASP]

 

Sample link

Note: Make sure that the Create event is bound to the last Syncfusion control in the page for an optimal experience.

 

Refer to the following example in the ASP.NET MVC platform,

 

Sample link

Note: Make sure that the Create event is bound to the last Syncfusion control in the page for an optimal experience.

Article ID: Published Date: Last Revised Date: Platform: Control:
8462 02/20/2018 02/20/2018 ASP.NET MVC General
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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.