web-pages use validation in helper class

Hi.

How can I use the validation functions in a helper class?
This one gives an error. Can I import something?
It dosen´t work with: @using System.Web.Helpers.Validation

@helper create() {
      Validation.RequireField("navn", "\"Navn\" skal udfyldes");
        if (IsPost && Validation.IsValid())
      {
            Response.Write("TEST");
      }
}

I´m using c# web-pages.
Jesper ChristensenProgrammerAsked:
Who is Participating?
 
Easwaran ParamasivamConnect With a Mentor Commented:
Instead you could check particular control has value or not like given below:

navn.Text == string.Empty
0
All Courses

From novice to tech pro — start learning today.