What might cause Google chrome to not render ASP.Net validators where Firefox does?
A registration page in a site I'm working on collects information on 2 named contacts, who are required to have email addresses and telephone numbers which do not overlap with one another.
I use several requiredfieldvalidators, regularexpressionvalidators, CompareValidators and some customvalidators.
STAGING-> Firefox: When I view this page using Firefox, all is fine.
Staging-> Chrome: When I view it using Chrome anything to do with validators is missing from the HTML source of the rendere开发者_如何转开发d page. The javascript and tags pertaining to said validation is completely absent from these pages.
Local -> Chrome: All fine again
So what am I doing wrong?
Updates:
- Staging machine has .Net 3.5 SP1. Local machine has 3.5 SP1 and 4.0
- %SystemRoot%\Microsoft.NET\Framework\ v2.0.50727\CONFIG\Browsers folder is same on both machines.
- Tried removing browser files from %SystemRoot%\Microsoft.NET\Framework\ v4.0.30319\Config\Browsers on local dev machine. No effect. Validators still work when referencing local Server
SOLVED: Full marks to Will because without his help (below) I would have spent hours at this.
Technically the incorrect browser sniffing was down to some rouge browsercaps info in one of the web.configs in the solution. the differences between dev and deploy came about because web.config differs in these scenarios
Perhaps ASP.Net's built-in browser sniffing: http://msdn.microsoft.com/en-us/library/x3k2ssx2.aspx
精彩评论