[Mono-bugs] [Bug 81928][Wis] New - problem in databinding if using method names starting with the string "Bind"

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Jun 22 06:15:12 EDT 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by s.martinz at caleidoscopio.it.

http://bugzilla.ximian.com/show_bug.cgi?id=81928

--- shadow/81928	2007-06-22 06:15:12.000000000 -0400
+++ shadow/81928.tmp.24262	2007-06-22 06:15:12.000000000 -0400
@@ -0,0 +1,61 @@
+Bug#: 81928
+Product: Mono: Class Libraries
+Version: 1.2
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Sys.Web
+AssignedTo: mhabersack at novell.com                            
+ReportedBy: s.martinz at caleidoscopio.it               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: problem in databinding if using method names starting with the string "Bind"
+
+Description of Problem:
+
+
+Steps to reproduce the problem:
+1. Create a simple web page with a simple gridView like the following:
+<asp:GridView ID="grd" runat="server" AutoGenerateColumns="False">
+
+	<Columns>
+
+		<asp:TemplateField HeaderText="sel.">
+
+			<headerstyle font-names="Verdana" font-size="7pt" width="1px" />
+
+			<itemtemplate>
+
+				<asp:ImageButton id="btnSelect" runat="server" CssClass=" "
+CommandArgument='<%# Binder_GetKey(DataBinder.Eval(Container,
+"DataItem.ID")) %>' CommandName="Selecting" ImageUrl="~/Images/grdSelect.gif">
+
+				</asp:ImageButton> 
+
+			</itemtemplate>
+
+		</asp:TemplateField>
+
+</wbc:Griglia>
+
+Where Binder_GetKey is a codebehind method. 
+
+Actual Results:
+The ASP.NET parser translates "Binder_GetKey" in "Evaler_GetKey", which
+obviously causes a runtime error, since Evaler_GetKey does not exists. 
+
+Expected Results:
+The ASP.NET parser should not change the name "Binder_GetKey".
+
+How often does this happen? 
+Everytime that in databinding we use a method name starting with "Bind",
+since the parser swaps it with "Eval". 
+
+Additional Information:
+I think the parser should look only for exact matches for the string "Bind"
+whereas now it checks if there is a method starting with it...


More information about the mono-bugs mailing list