MVC 5.1.2 EditorFor htmlAttributes -


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

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

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

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

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

Comments

Popular posts from this blog

c# - passing input text from view to contoller with FacebookContext using Facebook app -

ios - Does Core Data autoupdate a many to many relationship on saving -

Calling a C++ function from C# by passing a string with variable size to it -