View Full Version : [CLOSED] Getting "BADRESPONSE Unexpected token '<'" error while trying to bind html value to ext:ModelField .....

Feb 10, 2015, 2:01 PM

We have some html formatted text saved in db (sqlserver) as varchar.
Now when i tried to get this text from db and bind to grid or any other control i am getting this error "BADRESPONSE Unexpected token '<'"
I tried with removing reference of store to grid, so now its binding data only to store, even facing same error.
While if i replaced this text with normal string its working fine. (working fine with ID=1 and Message=TESTING123, in DB )
find bellow my table structure and code used in aspx. (please revert in case of any query)

Table Value in DB
ID | Message
1 | <div>TESTING123</div>

.aspx code

<asp:SqlDataSource ID="SqlDataSource" runat="server" SelectCommand="select ID , Message From table order by SortOrder" SelectCommandType="Text">
<asp:Parameter Name="ID" Type="Int32" />
<asp:Parameter Name="Viewed" Type="Boolean" />
<ext:Store runat="server" ID="Store" DataSourceID="SqlDataSource"
<ext:Model runat="server" IDProperty="ID">
<ext:ModelField Name="ID" Type="Int" />
<ext:ModelField Name="Message" Type="String" />

Feb 10, 2015, 7:02 PM
Hi @iansriley,

Please review your post wrapping the code in [CODE] tags.
Forum Guidelines For Posting New Topics (http://forums.ext.net/showthread.php?3440)

Feb 17, 2015, 11:42 AM
Here is a duplicate:

@iansriley, please avoid posting duplicates.

Also, please do not forget to use [CODE] tags.