Monday, December 19, 2011

Error 'System.Web.UI.WebControls.GridView' does not have a public property named 'SortedAscendingCellStyle'.

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. 

Parser Error Message: Type 'System.Web.UI.WebControls.GridView' does not have a public property named 'SortedAscendingCellStyle'.

Source Error: 



Line 91: <RowStyle BackColor="White" ForeColor="#003399" />
 Line 92: <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
 Line 93: <SortedAscendingCellStyle BackColor="#EDF6F6" />
 Line 94: <SortedAscendingHeaderStyle BackColor="#0D4AC4" />
 Line 95: <SortedDescendingCellStyle BackColor="#D6DFDF" />

I copied some files from my one project to another and got this error after lots and lots of struggle got the resolution as:
This error occurs when you are hosting your website on asp.net 2.0/3.5 and copied content from asp.net 4.0.

SortedAscendingCellStyle for GridView is new in .Net 4. It's not an error on your PC, but it is an error for your hosted account.

1 comment:

Charles Mattom said...

How to Solve this issue..