Search This Blog

Wednesday, December 19, 2007

CS0103: The name 'User' does not exist in the current context

Compilation 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: CS0103: The name 'User' does not exist in the current context

Source Error:
Line 6: <tr>
Line 7: <td colspan="2" align="center">
Line 8: <=User.Identity.Name %>
Line 9: </td>
Line 10: </tr>


Above is the error that i face when compiling my application.
To solve it, change <%=User.Identity.Name %> to <%=Page.User.Identity.Name %>

No comments: