It was happen when I was assigned value to a variable var desc = @Model.ShortDescription; so that it was happened afterwards I find out solution. I have assigned like this var desc = Model.ShortDescription; then works fine. We do not need to use @ symbol.
Server Error in '/' Application.
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: CS1513: } expected
Source Error:
Line 431: }
Line 432: }
Line 433:}
Source File: c:\Users\RASIK\AppData\Local\Temp\Temporary ASP.NET Files\root\739746d9\28af8a28\App_Web__partiallayout.cshtml.639c3968.g0kbsh4g.0.cs Line: 433
Show Detailed Compiler Output:
Show Complete Compilation Source:
Problem:
When I was assigned value like this, above error was happend.
@if (Model != null)
{
var dd= @Model.ShortDescription;
// your statement
}
Solution:
After I changed the above code assign value without using @, then error was resolved.
@if (Model != null)
{
var desc= Model.ShortDescription;
// your statement
}
Post your comments / questions
Recent Article
- ImportError: cannot import name 'url' from 'django.conf.urls' - Django Error
- How to Enable Virtualization in BIOS Security Settings in Intel Processors For Android Studio?
- Dependency 'androidx.activity:activity:1.8.0' requires libraries and applications that depend on it.
- AttributeError: 'NoneType' object has no attribute 'get_text' - Python
- ModuleNotFoundError: No module named 'openpyxl' - Python
- How to get thumbnail from vimeo video URL in Python?
- Remove all special characters, punctuation except spaces from string - Python
- OSError: cannot write mode RGBA as JPEG- Python
Related Article