Просмотр исходного кода

2007-12-17 Marek Habersack <[email protected]>

	* TemplateParser.cs: support the 'Src' directive attribute on 2.0
	profile as well as on the 1.1 one. Fixes bug #319016

svn path=/trunk/mcs/; revision=91462
Marek Habersack 18 лет назад
Родитель
Сommit
56318c25e2

+ 5 - 0
mcs/class/System.Web/System.Web.UI/ChangeLog

@@ -1,3 +1,8 @@
+2007-12-17  Marek Habersack  <[email protected]>
+
+	* TemplateParser.cs: support the 'Src' directive attribute on 2.0
+	profile as well as on the 1.1 one. Fixes bug #319016
+
 2007-12-16 Igor Zelmanovich <[email protected]>
 
 	* Page.cs: on CrossPagePostBack previous page is processed by Execute API,

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

@@ -563,6 +563,18 @@ namespace System.Web.UI {
 
 			if (src == null && codeFileBaseClass != null)
 				ThrowParseException ("The 'CodeFileBaseClass' attribute cannot be used without a 'CodeFile' attribute");
+
+			string legacySrc = GetString (atts, "Src", null);
+			if (legacySrc != null) {
+				if (src == null)
+					src = legacySrc;
+				else
+					// We need to compile it even though CodeFile is present, to
+					// report errors.
+					GetAssemblyFromSource (legacySrc);
+				
+				AddDependency (MapPath (legacySrc, false));
+			}
 			
 			if (src != null && inherits != null) {
 				// Make sure the source exists