[Mono-dev] TemplateControlCompiler.cs

Andrew Skiba andrews at mainsoft.com
Sun Apr 9 09:41:13 EDT 2006


Hi, Chris.

At revision 56619 you introduced the following code at
TemplateControlCompiler.cs:176

if (builder is RootBuilder) {
	typeString = parser.ClassName;
}

In my flow, parser.ClassName == "Default_aspx", which is unresolved, but
parser.PartialClassName has the correct value of "_Default".

At BaseCompiler.Init there is a similar code:

if (parser.IsPartial) {
	...
	mainClass = new CodeTypeDeclaration (parser.PartialClassName);
	...
} else {
	...
	mainClass = new CodeTypeDeclaration (parser.ClassName);
}

So, what do you think of the following patch? 

Thank you.
Andrew.

Index: TemplateControlCompiler.cs
===================================================================
--- TemplateControlCompiler.cs	(revision 59261)
+++ TemplateControlCompiler.cs	(working copy)
@@ -174,7 +174,10 @@
 			if (childrenAsProperties || builder.ControlType
== null) {
 				string typeString;
 				if (builder is RootBuilder) {
-					typeString = parser.ClassName;
+					if (parser.IsPartial)
+						typeString =
parser.PartialClassName;
+					else
+						typeString =
parser.ClassName;
 				}
 				else {
 					if (builder.ControlType != null
&& builder.isProperty &&



More information about the Mono-devel-list mailing list