Krokonoster
Dec 21st, 2010, 05:48 AM
I started a new project (of my own) taking things from a different angle, by firstly building a complete prototype in html (actually php) figuring out the design, layouts, css, client side scripts. Looks great.
then I created my presentation layer (MVC) and working this design into my views.
Now it's seems I'm going to have to create overloads of htmlhelpers for each and every "LabelFor", "DisplayFor" and "ValidationMessageFor", just because my design elements have their own set of css rules applied to each. (No, I dont want to change that. The idea of MVC is giving you full control of your markup,and that design's markup is lean, clean and load fast).
Figured I'd drop the thought here and see if someone have alternative suggestions.
Seems the biggest issue is ValidationMessageFor<T>. (I dont want to mess this one up, since I want to keep this new unobtrusive client side validation).
I tried the following, but now it show the background image applied by the style, even when there is no error...
@Html.ValidationMessageFor(model => model.UserName, null, new { @class = "input-notification error png_bg" })
then I created my presentation layer (MVC) and working this design into my views.
Now it's seems I'm going to have to create overloads of htmlhelpers for each and every "LabelFor", "DisplayFor" and "ValidationMessageFor", just because my design elements have their own set of css rules applied to each. (No, I dont want to change that. The idea of MVC is giving you full control of your markup,and that design's markup is lean, clean and load fast).
Figured I'd drop the thought here and see if someone have alternative suggestions.
Seems the biggest issue is ValidationMessageFor<T>. (I dont want to mess this one up, since I want to keep this new unobtrusive client side validation).
I tried the following, but now it show the background image applied by the style, even when there is no error...
@Html.ValidationMessageFor(model => model.UserName, null, new { @class = "input-notification error png_bg" })