Skip to content

@ for event handler doesn't work in cshtml razor page #7149

@deanilvincent

Description

@deanilvincent

Version

2.5.9

Reproduction link

https://jsfiddle.net/zausd38u/

Steps to reproduce

Since I'm using the latest version of Vue.JS that supports short hand code for events, I'm trying to use @click instead of v-on:click inside the razor .cshtml file but it doesn't work. I'm developing an app and the backend is ASP.Net Core.

What is expected?

The expected result should be a working:
@click

What is actually happening?

After encoding the @click="submitTest",

Visual Studio says, "The name 'click' does not exist in the current context. Cannot resolve symbol 'click'"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions