Feb 10, 2015, 2:01 PM
[CLOSED] Getting "BADRESPONSE Unexpected token '<'" error while trying to bind html value to ext:ModelField .....
Hi,
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 |
.aspx code
================
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">
<UpdateParameters>
<asp:Parameter Name="ID" Type="Int32" />
<asp:Parameter Name="Viewed" Type="Boolean" />
</UpdateParameters>
</asp:SqlDataSource>
<ext:Store runat="server" ID="Store" DataSourceID="SqlDataSource"
AutoLoad="true">
<Model>
<ext:Model runat="server" IDProperty="ID">
<Fields>
<ext:ModelField Name="ID" Type="Int" />
<ext:ModelField Name="Message" Type="String" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
Last edited by Daniil; Feb 17, 2015 at 11:44 AM.
Reason: Please use [CODE] tags, [CLOSED]