[Mono-dev] [PATCH] System.Web.Compilation.TemplateControlCompiler
Igor Zalmanovich
igorz at mainsoft.com
Wed Nov 15 03:53:09 EST 2006
Attached is patch for System.Web.Compilation.TemplateControlCompiler
that resolves the problem is described below.
When <%# Bind(...) %>-expression is used more then once for same control
The generated code looks like follow:
Line 174: private System.Collections.Specialized.IOrderedDictionary
@__ExtractValues__bctrl_98(System.Web.UI.Control @__container) {
Line 175: System.Collections.Specialized.OrderedDictionary @__table =
new System.Collections.Specialized.OrderedDictionary();
Line 176: System.Web.UI.WebControls.CheckBox CheckBox2;
Line 177: CheckBox2 = ((System.Web.UI.WebControls.CheckBox)
(@__container.FindControl("CheckBox2")));
Line 178: if ((CheckBox2 != null)) {
Line 179: @__table["Role"] = CheckBox2.Text;
Line 180: }
Line 181: System.Web.UI.WebControls.CheckBox CheckBox2;
Line 182: CheckBox2 = ((System.Web.UI.WebControls.CheckBox)
(@__container.FindControl("CheckBox2")));
Line 183: if ((CheckBox2 != null)) {
Line 184: @__table["IsInRole"] = CheckBox2.Checked;
Line 185: }
Line 186: return @__table;
Line 187: }
It causes compilation error, because the same variable is declared more
then once.
Please review.
Regards,
Igor Zelmanovich.
igorz at mainsoft.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TemplateControlCompiler.patch
Type: application/octet-stream
Size: 3054 bytes
Desc: TemplateControlCompiler.patch
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20061115/576f2bd1/attachment.obj
More information about the Mono-devel-list
mailing list