MVC Validation input-validation-error CSS not working
-
24-09-2019 - |
문제
morning
i can't get the input-validation-error css to work when i have a class already for the input box.
<%=Html.TextBox("FirstName", null, new { @Class = "text" })%>
<%=Html.ValidationMessage("FirstName", new { @style = "color: red;", @Class = "errorInValid" })%>
if i take out new { @Class = "text" } then
.input-validation-error
{
border: 1px solid #ff0000 !important;
background-color: red !important;
}
The above CSS works.
Help
regards, pete
thanks in advance (i am crap at CSS)
해결책
링커 경고는 코드와 아무 관련이 없습니다.컴파일러가 컴파일 소스에 추가 해야하는 Class FirstViewController
클래스를 찾을 수 없었습니다.
다른 팁
Add both .input-validation-error and .input.input-validation-error classes.
제휴하지 않습니다 StackOverflow