Hi Glen,
Thank you for your update.
Based on my understanding, the expando property problem should have been
fixed in current version of ASP.NET 2.0. For example, before Beta2, a
RequiredFieldValidator renders following HTML when requested by an uplevel
browser:
<span
controltovalidate="text1"
id="required1"
evaluationfunction="RequiredFieldValidatorEvaluateIsValid"
validationgroup="grp1"
initialvalue=""
style="color:Red;visibility:hidden;">required</span>
The controltovalidate, evaluationfunction, validationgroup and initialvalue
attributes are Expando properties.
During my test, this has been fixed in current version of ASP.NET 2.0 and
will render as:
<span id="required1"
style="color:Red;visibility:hidden;">required</span>
<script type="text/javascript">
<!--
var required1 = document.all ? document.all["required1"] :
document.getElementById("required1");
required1.controltovalidate = "text1";
required1.errormessage = "required";
required1.validationGroup = "grp1";
required1.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
required1.initialvalue = "";
// -->
</script>
As you can see, these attributes such as "validationGroup" are no longer
defined as expando properties.
I've done some test using some standard validators and created a simple
custom validator to test in Firefox and it works correctly.
Since you're encountering some error when using validators in Firefox, I
would suggest following possible causes to track down the problem.
1) ASP.NET 2.0 introduced concept of "ValidationGroup" which can be used in
3 places:
* BaseValidator: Use ValidationGroup property to specify which
validation group this validation control belongs.
* ValidationSummary: Use ValidationGroup property to specify the name of
the validation group for which the ValidationSummary control will summarize
error messages.
* Controls that will cause postback and have set
"CausesValidation=true", these controls each have a ValidationGroup
property that, when set, validates only the validation controls within the
specified group when the control triggers a post back to the server.
* System.Web.UI.WebControls.BulletedList
* System.Web.UI.WebControls.Button
* System.Web.UI.WebControls.CheckBox
* System.Web.UI.WebControls.CheckBoxList
* System.Web.UI.WebControls.DropDownList
* System.Web.UI.HtmlControls.HtmlButton
* System.Web.UI.HtmlControls.HtmlInputButton
* System.Web.UI.HtmlControls.HtmlInputImage
* System.Web.UI.WebControls.ImageButton
* System.Web.UI.WebControls.LinkButton
* System.Web.UI.WebControls.ListBox
* System.Web.UI.WebControls.RadioButtonList
* System.Web.UI.WebControls.TextBox
As you can see, if you have set ValidationGroup for your validators,
only controls with the same ValidationGroup value will trigger the
validation of these validators.
2) ASP.NET 2.0 uses user-agent of browser to determine the browser is
uplevel or downlevel, you can find browser definition at
%windir%\Microsoft.NET\Framework\<version>\Config\Browsers. Please verify
the user-agent that your Firefox browser sending is correct. It should work
for a default installation of Firefox. During my test, the javascript files
generated by WebResource.axd are the same from IE or Firefox, you can
verify this by manually copy the javascript src url to browser address bar
and save it locally. If they're different, which means probably the browser
is not recognized correctly.
3) Is it possible that you're using some Firefox extension that prevents
the javascript from rendering correctly?
Hope this helps. Please feel free to post here if anything is unclear.
Regards,
Walter Wang (
[email protected], remove 'online.')
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.