I'm developing ASP.NET page on localhost and then uploading it on the server. On localhost I successfuly use nested classes in DataField property of BoundField of an GridView. By nested class I mean this: DataField="Object.property"
where Object
is a property of the data item bound to the row of the GridView. Everything works fine. But when I publish the website on the server, an exception occures:
A field or property with the name 'Object.property' was not found on the selected data source.
I was trying to find the solution and found this: GridView bound with Properties of nested class
I continued finding, but everywhere was mentioned that using nested classes in boundfields isn't possible. But its working like a charm for me on localhost.
Does anyone know why? Is it the latest version of .NET Framework (I have installed version 4.5 on localhost and version 4 on the server) or what? Yes it looks obvious that the version is the reason, but I haven't found any mention about it.
Thanks for your clarification. Uiii