MVC 5.1.2 EditorFor htmlAttributes -


यह काफी आसान दिखता है:

@ एचटीएमएल.एडिटटरफॉर (एम = & gt; एम.पश्चरनाम, नया {HTML गुणों = नया {@ वर्ग = "फॉर्म-कंट्रोल"},}

हालांकि, उत्सर्जित पृष्ठ पर यह क्लास लागू नहीं है।

  @ html.EditorFor (मॉडल = & gt; model.FirstName, नया {htmlAttributes = new {@class = "form-control"}})   

यह मेरे लिए काम करने लगता है, आपके पास अंत में एक अल्पविराम है और पैरांथासिस को सही ढंग से बंद करने में विफल रहे हैं।

Comments

Popular posts from this blog

How can I add a seperate action listener to all 14 of my buttons at once that can determine player turn?(java) -

php - Sorting an multidimension array using usort fails -

Simple file compression in C -