Zdenek G
Zdenek G

Reputation: 351

What mean @:@ in Razor syntax?

Maybe stupid question, but i didn't find what it mean.

code example:

@if (isSomething ) {
    @:@Scripts.Render("~/scripts/some-scripts")
}

Upvotes: 1

Views: 411

Answers (1)

Guffa
Guffa

Reputation: 700840

That seems redundant. The @: specifies literal content, but then @ takes you back into the server code context. It should work the same as:

@if (isSomething ) {
  Scripts.Render("~/scripts/some-scripts")
}

Upvotes: 1

Related Questions