Knowledge Base
smartDBforms.NET for ASP.NET 2
 
 
Knowledge Base Forum
Search knowledge base:

PRB: 'A call to Bind was not well formatted' when field name contains spaces
Monday, 01 October 2007
When using the two-way databinding expression Bind with parameters which contain spaces or other special characters an error occurs.

SYMPTOMS

When using the two-way databinding expression Bind with parameters which contain spaces or other special characters the following error occurs:

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: A call to Bind was not well formatted.  Please refer to documentation for the correct parameters to Bind.


CAUSE

The problem is caused by the ASP.NET parser which expects the Bind parameter to be an alphanumeric identifier.


RESOLUTION

You can resolve this problem in two ways:

Use the SmartDBControl control to edit the field which contains special characters. Using SmartDBControl does not require two-way databinding.

The other way is to replace Bind command with Eval. In addition you have to handle the SmartDBView.ValuesExtracted in order to extract the new value. For example:

Protected Sub SmartDBView1_ValuesExtracted(ByVal sender As Adillis.SmartDBForms.SmartDBView, ByVal e As Adillis.SmartDBForms.SmartDBViewExtractedArgs)
e.Values("Field Name") = CType(sender.FindControl("TextBox1"), TextBox).Text
End Sub


Page Options: format for printing  Format for Printer

How would you rate the quality of this content?
Poor - - Excellent
Comments? 
Overall Rating: No ratings available.
Comments Left:
Left on Wednesday, 12 March 2008 by Anonymous
Comments:
No ratings available.
Copyright 2006-2008 Adillis Terms Of Use Feedback Contact Us