Hexadecimal error when trying to save value in a grid

9 replies. Last post: September 29, 2014 8:05 AM by Yudi
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
T LusbyMember

We have a couple of grids that allow our users to put in special characters (&,*,#) and also (<,>,>=,<>).

 

One our our grids use a dropdownlist and in the layoutsettings to populate the valuelist we set a hashtable with the following data.

htOperator.Add("1", clsCommon.EncodeXml("= Equal to"));

htOperator.Add("2", clsCommon.EncodeXml("<> Not equal to")); htOperator.Add("3", clsCommon.EncodeXml("> Greater than")); htOperator.Add("4", clsCommon.EncodeXml("< Less than")); htOperator.Add("5", clsCommon.EncodeXml("<= Less than or equal to")); htOperator.Add("6", clsCommon.EncodeXml(">= Greater than or equal to"));

It will display the correct data, but when we save using <> or <, we get the error below.

"Exception of type 'System.Web.HttpUnhandledException' was thrown.Name cannot begin with the '>' character, hexadecimal value 0x3E."

I have tried EncodeXML around the text and still I get the same error. 

All times are GMT -5. The time now is 4:22 PM.
Previous Next