Link to home
Start Free TrialLog in
Avatar of ChiBella
ChiBella

asked on

Validator Controls - Slow Page Down and Cause Flickering

Having a few problems using the .net 2.0 validator controls.

I have a section of a page that displays an update area if a button is selected (section.visible=true). The update section has a few validator controls. Before I added the controls, the page was stable (no flickering)...since adding the controls, the entire page flickers and both sections are redrawn at the time the display button is selected.
The other problem is if I include Comparevalidators for 3 date fields within this section, the entire page slows painfully down....taking more than 5 seconds to load.  What am I doing wrong or is this normal?
Avatar of surajguptha
surajguptha
Flag of United States of America image

Usually the first time a page loads it take some time to compile the project. It may be silly but does it take 5 seconds even on the subsequent page loads?

Adding a couple of controls shouldnt ideally take a lot of time to load on the intranet or the local machine.How fast is your network? Is it fast ?
Avatar of ChiBella
ChiBella

ASKER

yes it's pretty fast...the issue is if I remove the controls it is VERY fast but if I add the controls it is VERY slow. A big difference in the before and after. So apparently the controls are slowing things down.

As for your flicking can you enable the SmartNavigation in your page?
I dont see why it should be slow because the load of the page would just have a little more HTML tags extra which shouldnt take 5 seconds !!! Unless the javascripts on the page is being monitored by some firewall/ spy ware client you may be running
I have very little javascript and even if I remove it and just use the requiredfieldvalidator it is slow. If I add the compare validators it becomes unbearably slow.

Are the controls being reloaded whenever I set the placeholder section to visible?
>I have a section of a page that displays an update area if a button is selected

Can you try removing this and see how the response times are?
The Compare Validatory internally uses some client scripting to validate your controls. Thats what i meant by javascript. Can you try switching off temporarily any firewall program or internet security program u might be using ?
Even leaving just the validationSummary causes the page to slow way down and flicker.
Can you try switching off temporarily any firewall program or internet security program u might be using ?
I disabled the virus scan...that's about all I'm permitted to do. That made no difference.

I 'm thinking about dropping the client side validation controls.
Ok the reason it is slow is because of the client side scripting added by the validators
It seems to be like a common problem. There are also some ways to make it a bit faster

Check this link http://forums.asp.net/p/904459/997394.aspx

After implenting the suggestions, If you still dont feel like its fast enough you can go ahead and remove the validators
Yes, I read that post before. Doesn't really offer an explanation or solution. I have very little javascript in the page so don't think it's my code. The main reason I wanted to use the controls was for the message box for display of all errors.
I originally had this server side...but didn't like the message box (displayed on a white page)....but just read this and will try it.

http://forums.asp.net/p/55926/1938786.aspx

>> I have very little javascript in the page so don't think it's my code.
Like i have said its not your code. Javascript is autogenerated by the .net framework when you put validation controls in to your page.

If you are just doing a few simple validation why dont you hand code it in javascript?
It will be much more than a little if I remove the controls. I did find a way to display a message box from c# without the blank page displaying. Since I am adding other controls (3rd party Obout menu control) that apparently also adds some flickering, I have decided to add the light validators and leave the heavy one's (compare) out.
Have you tried enabling Smart Navigation?
No, what is Smart Navigation?
ASKER CERTIFIED SOLUTION
Avatar of surajguptha
surajguptha
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
are you referring to

Method 1: Use the ASP.NET 2.0 client callback manager
yes thats right
Did it help reduce flicker?
I have not worked this yet. I am currently working with the Obout vendor with their easymenu. The issue is trying to load the menu from a database and keeping persistence within the masterpage.