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?

Improve company productivity with a Business Account.Sign Up

x
 
Easwaran ParamasivamConnect With a Mentor Commented:
Instead you could check particular control has value or not like given below:

navn.Text == string.Empty
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.