ASP.NET MVC Required Field Indicator

前端 未结 6 2388
我在风中等你
我在风中等你 2020-12-15 00:17

For fields in my ASP.NET MVC view that have been attributed as required, is there any way for the framework to render some sort of indicator automatically that the field is

6条回答
  •  离开以前
    2020-12-15 01:02

    I modified Renato Saito's answer to include more field types (all types of input and select lists) and use the jQuery namespace instead of the generic $. Here is my revision:

    
    

提交回复
热议问题