+2009-05-10 Marek Habersack <mhabersack@novell.com>
+
+ * Makefile (TEST_RESOURCE_FILES): added
+ Test/mainsoft/NunitWebResources/ExpressionInListControl.aspx
+
2009-04-28 Marek Habersack <mhabersack@novell.com>
* Makefile (TEST_RESOURCE_FILES): added
Test/mainsoft/NunitWebResources/NoDoubleOnInitOnRemoveAdd.aspx.cs \
Test/mainsoft/NunitWebResources/LoginDisplayRememberMe.aspx \
Test/mainsoft/NunitWebResources/NoBindForMethodsWithBindInName.aspx \
- Test/mainsoft/NunitWebResources/LinkInHeadWithEmbeddedExpression.aspx
+ Test/mainsoft/NunitWebResources/LinkInHeadWithEmbeddedExpression.aspx \
+ Test/mainsoft/NunitWebResources/ExpressionInListControl.aspx
RESX_DIST = resources/TranslationResources.resx
ifeq (net_2_0, $(PROFILE))
if (builder == null)
return false;
- if (!runatServer && location.PlainText.IndexOf ("<%") > -1)
+ // This is as good as we can do for now - if the parsed location contains
+ // both expressions and code render blocks then we're out of luck...
+ string plainText = location.PlainText;
+ if (!runatServer && plainText.IndexOf ("<%$") == -1&& plainText.IndexOf ("<%") > -1)
return false;
#if NET_2_0
PageParserFilter pfilter = PageParserFilter;
break;
default:
- builder.AppendLiteralString (location.PlainText);
+ string text = location.PlainText;
+ if (text != null && text.Trim ().Length > 0)
+ builder.AppendLiteralString (text);
break;
}
}
+2009-05-10 Marek Habersack <mhabersack@novell.com>
+
+ * AspGenerator.cs: keep processing the tag if it is not a server
+ one and contains expressions and no code render blocks.
+
2009-05-05 Marek Habersack <mhabersack@novell.com>
* BuildManager.cs: RemoveFailedAssemblies wraps the compilation
public override void AppendLiteralString (string s)
{
- if (s != null && s.Trim () != "")
+ if (s != null && s.Trim ().Length > 0)
throw new HttpException ("Literal content not allowed for " + ControlType);
}
+2009-05-10 Marek Habersack <mhabersack@novell.com>
+
+ * TemplateControlCompilerTest.cs: added a test for expressions in
+ list control items.
+
2009-04-28 Marek Habersack <mhabersack@novell.com>
* TemplateControlCompilerTest.cs: added test for bug #498637
WebTest.CopyResource (GetType (), "ContentPlaceHolderInTemplate.aspx", "ContentPlaceHolderInTemplate.aspx");
WebTest.CopyResource (GetType (), "ContentPlaceHolderInTemplate.master", "ContentPlaceHolderInTemplate.master");
WebTest.CopyResource (GetType (), "LinkInHeadWithEmbeddedExpression.aspx", "LinkInHeadWithEmbeddedExpression.aspx");
+ WebTest.CopyResource (GetType (), "ExpressionInListControl.aspx", "ExpressionInListControl.aspx");
#endif
}
HtmlDiff.AssertAreEqual (originalHtml, renderedHtml, "#A1");
}
+
+ [Test]
+ public void ExpressionInListControl ()
+ {
+ string pageHtml = new WebTest ("ExpressionInListControl.aspx").Run ();
+ string renderedHtml = HtmlDiff.GetControlFromPageHtml (pageHtml);
+ string originalHtml = @"<select name=""DropDown1"" id=""DropDown1"">
+ <option value=""strvalue"">str</option>
+
+</select>";
+ HtmlDiff.AssertAreEqual (originalHtml, renderedHtml, "#A1");
+ }
#endif
[Test]
--- /dev/null
+<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MyPage.aspx.cs" Inherits="MyPage" %>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" >
+<head id="Head1" runat="server">
+ <title>Untitled Page</title>
+</head>
+<body>
+ <form id="form1" runat="server">
+ <div>
+ <%= MonoTests.stand_alone.WebHarness.HtmlDiff.BEGIN_TAG %><asp:DropDownList runat="server" id="DropDown1"><asp:ListItem Text="<%$ AppSettings:strvalue %>" Value="strvalue"/></asp:DropDownList><%= MonoTests.stand_alone.WebHarness.HtmlDiff.END_TAG %>
+ </div>
+ </form>
+</body>
+</html>