Rookian Rookian -4 years ago 111
C# Question

How do I define a method in Razor?

How do I define a method in Razor?

Answer Source

Leaving alone any debates over when (if ever) it should be done, @functions is how you do it.

@functions {

    // Add code here.

}
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download