Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
portion of my code is as below

HTML
 @for (int i = 0; i < Model.UtilityLineItems.Count; i++)
{
    <div class="editor-label"> 
       @Html.DisplayFor(x => x.UtilityLineItems[i].Line_Item_Name)
       @Html.TextBoxFor(x => x.UtilityLineItems[i].Value_1)
    </div>
}

Value_1 is having datatype int
and i wants to generate a server side validation msg if user enters string into text box for Value_1, currently it display msg like "The value 'ABC' is not valid for Value_1."

But i wants to display a message like "The value '123443434asx' is not valid for Line_Item_Name." where Line_Item_Name is a column name will be replaced by appropriate value.

Thanks.
Posted

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