Posted on: 5/6/2014 3:53:28 PM | Views : 442

I am trying to add a new record via my grid.  I have an Eval() function that is wrapped within a HtmlEncode().  I receive the following error when trying to add a record. When I edit a record it works fine:
Unable to cast object of type 'System.DBNull' to type 'System.String'.
 Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode((string)Eval("FirstNm")) %>'>   
 

Go to the complete details ...