When generating code for a property or field, use the name
retrieved from the metadata by reflection instead of the one
parsed from html. Fixes bug #82687. Patch from SunHo Kim
<zsunno@gmail.com>, thanks
svn path=/trunk/mcs/; revision=85269
* TemplateControlCompiler.cs: make sure that base class doesn't
contain a field of the same name which is accessible from the
current control if we're within a singleton template.
+ When generating code for a property or field, use the name
+ retrieved from the metadata by reflection instead of the one
+ parsed from html. Fixes bug #82687. Patch from SunHo Kim
+ <zsunno@gmail.com>, thanks!
2007-08-29 Marek Habersack <mhabersack@novell.com>
string prop_field = id.Replace ("-", ".");
string [] parts = prop_field.Split (new char [] {'.'});
int length = parts.Length;
+
if (length < 2 || !InvariantCompareNoCase (member.Name, parts [0]))
return false;
if (sub_member == null)
return false;
- string new_prefix = prefix + parts [0] + ".";
+ string new_prefix = prefix + member.Name + ".";
string new_id = id.Substring (hyphen + 1);
return ProcessPropertiesAndFields (builder, sub_member, new_id, attValue, new_prefix);
}