ASPX Incorrect Error

In a C# ASPX page the following line is valid but Resharper highlights it as an error:

<% Response.StatusCode = 500 %>

Error: ; expected after the 500.

Is this a bug I should submit to the issue tracker?

 

Using VS2017 with R# 2017.1.3

0
3 comments

Hello Daniel!

 

Thank you for the feedback.

I've filed correspondent issue - https://youtrack.jetbrains.com/issue/RSRP-465864.

You are welcome to comment or vote for it.

0

@Daniel, ReSharper is correct.

Run the page and you will get a error: CS1002: ; expected

0

This is very odd. In a standalone C# Web Forms project, you are correct.

However, as part of a C# MVC with razor views, adding the semi colon results in this error:

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: BC30037: Character is not valid.

Source Error:

Line 1:  <% Response.StatusCode = 500; %>

0

Please sign in to leave a comment.