Reputation: 2143
I have a code block in some JavaScript on a razor page. Just before the code block I have a normal JavaScript variable. How do I access this variable from withing the Code Block?
Upvotes: 1
Views: 1071
Reputation: 6802
I belive you could use @:
Something like this:
if(context.Project.Find("ProjectId"){
@:actionToTake = "ProjectOutcome";
}
or the special text-tag
if(context.Project.Find("ProjectId"){
<text>actionToTake = "ProjectOutcome";</text>
}
Upvotes: 1