hi
below code is my view am trying to add required field validator in red color on text-boxes( txtValue, txtLocation)..
Note:
#1 ) i have set if condition in this view that you can see below.
#2 ) textboxes are called in ID
@using (Html.BeginForm())
{
}
@if (ViewBag.Message == true)
{
}
else
{
if (Model != null)
{
if (Model.Count() != 0)
{
Searched for "@Session["searched"]"
@foreach (var item in Model)
{
@item.BusinessName
@item.FirstName
@item.BusinessCategory

Map
ZipCode
@item.ZipCode
@Html.ActionLink("Book An Appointment", "CalendarView", "Appt", new { id = @item.UserID }, null)
@*@Html.ActionLink("Book An Appointment", "Popup", "Search", new { @class = "openDialog", data_dialog_id = "aboutlDialog", data_dialog_title = "Additinal Customer" })*@
}
}
else
{
}
}
}
3 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rajeesh MenothPosted Aug 24, 2015, 6:12 AM
Ruga LincyPosted Aug 24, 2015, 6:05 AM
Rajeesh MenothPosted Aug 24, 2015, 6:01 AM