@Html.LabelFor(model => model.ServiceTypeCode)</td>
 @Html.DropDownList("ServiceTypeId", new SelectList(ViewBag.ListServiceTypeClass, "ServiceTypeId", "ServiceTypeCode", Model.ServiceTypeId), "")

can anyone know how to do this.

If ServiceTypeCode = 'A1SG43'
{
@Html.EditorFor(model => model.StatutoryMaintenance)
}
else
{
@Html.EditorFor(model => model.CalloutDate)
}

How to achieve this please.

Can you be a bit more descriptive regarding your issue. The code above doesnt look like traditional ASP.NET, at least not Web Forms... maybe MVC?

Yes jorge it's MVC :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.