Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Experts,

I have a model Passenger in which have Fname Property in which have Required Field Validator and its error message.
In error message having a parameter option where i want to send the Id field of Model. which is already having in model and view both.
so please how can it possible in client side validation.

C#
public class Passenger
  {
      public Passenger(int counter)
      {
      Id = counter;
      }
      public int Id { get; set; }
      [Required(ErrorMessage= "Please Provide the Name of Traveler {0}" ]
      public string Fname { get; set; }
  }



thanks in advanced
Posted

1 solution

Hi,

Probably u should be using custom validation for that.
Here's a link http://www.dotnetcurry.com/ShowArticle.aspx?ID=776[Custom Validation]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900