G
Guest
I'm trying to use this malformed code from:
http://forums.asp.net/thread/1384075.aspx
In this method, I get the error:
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.
Compiler Error Message: CS0118: 'System.Web.UI.WebControls.SortDirection' is
a 'type' but is used like a 'variable'
Source Error:
Line 32: string newSortDirection = String.Empty;
Line 33:
Line 34: switch (SortDirection)
Line 35: {
Line 36: case SortDirection.Ascending
private string ConvertSortDirectionToSql(SortDirection sortDireciton)
{
string newSortDirection = String.Empty;
switch (SortDirection)
{
case SortDirection.Ascending:
newSortDirection = "ASC";
break;
case SortDirection.Descending:
newSortDirection = "DESC";
break;
}
return newSortDirection;
}
http://forums.asp.net/thread/1384075.aspx
In this method, I get the error:
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.
Compiler Error Message: CS0118: 'System.Web.UI.WebControls.SortDirection' is
a 'type' but is used like a 'variable'
Source Error:
Line 32: string newSortDirection = String.Empty;
Line 33:
Line 34: switch (SortDirection)
Line 35: {
Line 36: case SortDirection.Ascending
private string ConvertSortDirectionToSql(SortDirection sortDireciton)
{
string newSortDirection = String.Empty;
switch (SortDirection)
{
case SortDirection.Ascending:
newSortDirection = "ASC";
break;
case SortDirection.Descending:
newSortDirection = "DESC";
break;
}
return newSortDirection;
}