svn path=/branches/mono-2-2/mcs/; revision=118815
verbatim code. The only difference between the two is that in the
latter case Bind is replaced with Eval in the output code. Fixes
bug #444725
+ If BindingDirection of the parent template builder is OneWay in
+ RegisterBindingInfo, do not throw an exception but simply do not
+ register the binding.
2008-10-29 Marek Habersack <mhabersack@novell.com>
if (match.Success) {
string bindingName = match.Groups [1].Value;
TemplateBuilder templateBuilder = builder.ParentTemplateBuilder;
- if (templateBuilder == null || templateBuilder.BindingDirection == BindingDirection.OneWay)
+
+ if (templateBuilder == null)
throw new HttpException ("Bind expression not allowed in this context.");
-
+
+ if (templateBuilder.BindingDirection == BindingDirection.OneWay)
+ return;
+
string id = builder.attribs ["ID"] as string;
if (id == null)
throw new HttpException ("Control of type '" + builder.ControlType + "' using two-way binding on property '" + propName + "' must have an ID.");