I need to load an image that is named by the current user's username. This is stored in a session variable. The photo of the user must appear on the page by loading depending on the variable name. For example, if the name of the logged in user is "john", john.jpg must be loaded. So far, I have tried:
<img src="../Content/img/@Session["username"].jpg" class="user-image" alt="User Image" />
but this gives an error saying there is no object or definition name for jpg, probably because it takes the .jpg suffix as a method. Any idea on how to resolve this? Thanks in advance.