Test/mainsoft/NunitWebResources/ValidPropertyBind2.aspx \
Test/mainsoft/NunitWebResources/ValidPropertyBind3.aspx \
Test/mainsoft/NunitWebResources/ValidPropertyBind4.aspx \
+ Test/mainsoft/NunitWebResources/ValidPropertyBind5.aspx \
Test/mainsoft/NunitWebResources/ReadWritePropertyControl.ascx \
Test/mainsoft/MainsoftWebTest/nunitweb_config.xml \
Test/mainsoft/NunitWebResources/TemplateControlParsingTest.aspx \
+2008-12-08 Marek Habersack <mhabersack@novell.com>
+
+ * TemplateControlCompiler.cs: use the correct regex match group
+ index in SanitizeBindCall (), fixes bug #457011
2008-12-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
#if NET_2_0
List <string> masterPageContentPlaceHolders;
+ // When modifying those, make sure to look at the SanitizeBindCall to make sure it
+ // picks up correct groups.
static Regex bindRegex = new Regex (@"Bind\s*\(\s*[""']+(.*?)[""']+((\s*,\s*[""']+(.*?)[""']+)?)\s*\)\s*%>", RegexOptions.Compiled | RegexOptions.IgnoreCase);
static Regex bindRegexInValue = new Regex (@"Bind\s*\(\s*[""']+(.*?)[""']+((\s*,\s*[""']+(.*?)[""']+)?)\s*\)\s*$", RegexOptions.Compiled | RegexOptions.IgnoreCase);
#endif
{
GroupCollection groups = match.Groups;
StringBuilder sb = new StringBuilder ("Eval(\"" + groups [1] + "\"");
- Group second = groups [2];
+ Group second = groups [4];
if (second != null) {
string v = second.Value;
if (v != null && v.Length > 0)
+2008-12-08 Marek Habersack <mhabersack@novell.com>
+
+ * TemplateControlCompilerTest.cs: added another valid Bind
+ expression test.
+
2008-12-01 Marek Habersack <mhabersack@novell.com>
* TemplateControlCompilerTest.cs: Added test for bug #449970
WebTest.CopyResource (GetType (), "ValidPropertyBind2.aspx", "ValidPropertyBind2.aspx");
WebTest.CopyResource (GetType (), "ValidPropertyBind3.aspx", "ValidPropertyBind3.aspx");
WebTest.CopyResource (GetType (), "ValidPropertyBind4.aspx", "ValidPropertyBind4.aspx");
+ WebTest.CopyResource (GetType (), "ValidPropertyBind5.aspx", "ValidPropertyBind5.aspx");
WebTest.CopyResource (GetType (), "ReadWritePropertyControl.ascx", "ReadWritePropertyControl.ascx");
WebTest.CopyResource (GetType (), "ContentPlaceHolderInTemplate.aspx", "ContentPlaceHolderInTemplate.aspx");
WebTest.CopyResource (GetType (), "ContentPlaceHolderInTemplate.master", "ContentPlaceHolderInTemplate.master");
{
new WebTest ("ValidPropertyBind4.aspx").Run ();
}
+
+ [Test]
+ public void ValidPropertyBindTest5 ()
+ {
+ new WebTest ("ValidPropertyBind5.aspx").Run ();
+ }
#endif
[Test]
+2008-12-08 Marek Habersack <mhabersack@novell.com>
+
+ * NunitWebResources/ValidPropertyBind5.aspx: added
+
+ * NunitWebResources/ReadWritePropertyControl.ascx: added a
+ writable string property.
+
2008-11-21 Marek Habersack <mhabersack@novell.com>
* NunitWebResources/WebLogin.config,
get { return _readWriteProperty; }
set { _readWriteProperty = value; }
}
+
+ string _readWriteProperty2;
+ [System.ComponentModel.Bindable (true)]
+ public string ReadWriteProperty2
+ {
+ get { return _readWriteProperty2; }
+ set { _readWriteProperty2 = value; }
+ }
</script>
--- /dev/null
+<%@ Page Language="C#" 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">
+<%@ Register TagPrefix="uc1" TagName="ReadWritePropertyControl" Src="ReadWritePropertyControl.ascx" %>
+
+<html xmlns="http://www.w3.org/1999/xhtml" >
+ <head>
+ <title>UrlProperty test</title>
+ </head>
+<body>
+ <form id="form1" runat="server">
+ <asp:FormView runat="server" ID="fv1" DataSourceID="DataSource1" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" GridLines="Vertical" >
+ <ItemTemplate>
+ <uc1:ReadWritePropertyControl runat="server" ID="wuc1" ReadWriteProperty2='<%# Bind("Data", "ValidPropertyBind5.aspx?Data={0}") %>' />
+ </ItemTemplate>
+ </asp:FormView>
+ <asp:ObjectDataSource ID="DataSource1" runat="server" TypeName="MonoTests.System.Web.Compilation.BindTestDataSource" SelectMethod="GetData" />
+ </form>
+</body>
+</html>