Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6242907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:02:28+00:00 2026-05-24T12:02:28+00:00

How can I use this convention in an asp.net WEBFORM Business object class? Example

  • 0

How can I use this convention in an asp.net WEBFORM Business object class?

Example In MVC

using System.ComponenModel.DataAnnotation;

public class Customer
{
    [Required]
    [StringLength(5,20)]
    public string FirstName { get; set;}

    [Required]
    [StringLength(5,20)]
    public string LastName { get; set;}
}

I want to use this data annotation in my asp.net webform businessobject class for client validation and server validation.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T12:02:29+00:00Added an answer on May 24, 2026 at 12:02 pm

    Unfortunately WebForms doesn’t have native support of Data Annotations like MVC.

    But you can use custom decisions:

    1. system componentmodel dataannotations for asp.net webforms

    2. Building an ASP.NET Validator Using Data Annotations

    3. ASP.NET: WebForms Validation with Data Annotations

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a 32-bit .NET app, I can use this OLEDB connection string to connect
Can I use this approach efficiently? using(SqlCommand cmd = new SqlCommand(GetSomething, new SqlConnection(Config.ConnectionString)) {
I've written a site for my summer internship using ASP.NET MVC. The progress is
I'm checking out Linq for NHibernate 2.1 to use in an ASP.NET MVC application
I created one asp.net mvc application using linq to sql, and in the generated
I want to use Javascript Alert function in my ASP.NET page. For example like
I'm creating a multi-tenant Asp.Net MVC 3 Web app, and using EF4.1 code first
I have a asp.net project that uses mvc-mini-profiler. I was using version 1.7 of
Right now I can use this URL to request a Google Static Maps image
So in my documentation it says: public event TreeViewPlusNodeCheckedEventHandler NodeChecked() You can use this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.