Browse Source

2005-07-24 Gonzalo Paniagua Javier <[email protected]>

	* TemplateParser.cs: if there are no commas in the assembly name, just
	LoadWithPartialName, as Load will throw.


svn path=/trunk/mcs/; revision=47617
Gonzalo Paniagua Javier 20 năm trước cách đây
mục cha
commit
acecd62bb1

+ 8 - 1
mcs/class/System.Web/System.Web.UI/ChangeLog

@@ -1,12 +1,19 @@
+2005-07-24 Gonzalo Paniagua Javier <[email protected]>
+
+	* TemplateParser.cs: if there are no commas in the assembly name, just
+	LoadWithPartialName, as Load will throw.
+
 2005-07-24 Eyal Alaluf ([email protected])
+
 	* TemplateControl.jvm.cs: fixed resource loading
-    * PageHandlerFactory.jvm.cs: Added file
+	* PageHandlerFactory.jvm.cs: Added file
 
 2005-07-19 Eyal Alaluf ([email protected])
 	* Added TemplateControl.jvm.cs that implements Grasshopper (TARGET_J2EE)
 	  limited model of compiling ASP pages.
 
 2005-07-19 Eyal Alaluf ([email protected])
+
 	* Added ControlBuilder.jvm.cs ObjectTagBuilder.jvm.cs as part of the TARGET_J2EE configuration.
 
 2005-07-13 Gonzalo Paniagua Javier <[email protected]>

+ 12 - 9
mcs/class/System.Web/System.Web.UI/TemplateParser.cs

@@ -386,19 +386,22 @@ namespace System.Web.UI
 			}
 
 			Assembly assembly = null;
-			try {
-				assembly = Assembly.Load (name);
-			} catch (Exception) {
+			Exception error = null;
+			if (name.IndexOf (',') != -1) {
 				try {
-					assembly = Assembly.LoadWithPartialName (name);
-				} catch (Exception e) {
-					ThrowParseException ("Assembly " + name + " not found", e);
-				}
+					assembly = Assembly.Load (name);
+				} catch (Exception e) { error = e; }
+			}
 
-				if (assembly == null)
-					ThrowParseException ("Assembly " + name + " not found", null);
+			if (assembly == null) {
+				try {
+					assembly = Assembly.LoadWithPartialName (name);
+				} catch (Exception e) { error = e; }
 			}
 
+			if (assembly == null)
+				ThrowParseException ("Assembly " + name + " not found", error);
+
 			AddAssembly (assembly, true);
 			return assembly;
 		}