In my experiences with MVC I have some utilities to share . Some of them are :
- DateTime fields
- Numeric fields
- Watermark
- Dropdownlist
- more!
Please see the project and give feedback
In my experiences with MVC I have some utilities to share . Some of them are :
Please see the project and give feedback
Tags: ASP.NET MVC, C#, combobox, mvc
This entry was posted on Sunday, May 30th, 2010 and is filed under ASP.NET MVC, source helpers. You can follow any responses to this entry through RSS 2.0. You can leave a response, or trackback from your own site.
Arclite theme by digitalnature | powered by WordPress
#1 by Krokonoster at May 30th, 2010
| Quote
Thanks for posting this and making things so clear via examples.
One question at this stage: In the DateTime display template, you format dates as “dd MMM yyyy”.
Shouldn’t one rather format it according to the user’s current culture info settings?
#2 by admin at May 31st, 2010
| Quote
Oh, yes. Like the numeric, you can do the same. I just want the example to be more “evident”!
#3 by Krokonoster at May 31st, 2010
| Quote
Hi,
)
Ok, I’ve been fiddling with your examples (very educational experience, not only for Templated Helpers but also jQuery datapicker and others
I found one should use the WaterMarking with caution (maybe only for showing a date format), as it kind of messed with my validation.
The DateTime helper I took out eventually. Reason is that on one place I want the user to select date of birth, on another place a user to specify a date range (say a booking)…the different options to be set mad it kind of impossible to use a generic template. (Or did I miss something obvious).
Once again, this is good stuff. Continuing my venture and come back with some more comments.
#4 by dhanaji at October 19th, 2010
| Quote
Hi ,
I am using watermark in our MVC application. It works fine in IE. I am facing one issue in FireFox and Chrome.
I am using watermark on our login page. I want watermark for username which is first textbox control on a page.When page loads username is focused by default, so watermark is not visible when page loads, if you click somewhere else it appears.This is happening in firefox and chrome only. I am not sure whether it is default behaviour of browser, but in IE username is not focused when page loads so there it appears fine.
Thanks,
Dhanaji
#5 by Andrei Ignat at October 20th, 2010
| Quote
This is a browser issue, and the behaviour is normal
#6 by dhanaji at October 20th, 2010
| Quote
Hi,
How to override this browser issue? appreciate your help
Thanks,
Dhanaji
#7 by Andrei Ignat at October 20th, 2010
| Quote
Unfortunately not .. But you can search for another watermarking “persistent” plugin : does not hide until the user types something
#8 by PeterG at May 23rd, 2011
| Quote
Hi Andrei – great controls! I’m looking to use the Calender control in my project but as an MVC newbie I’m really struggling.
So far I have added & imported, EditorTemplates, DisplayTemplates, calendar.gif – all to the correct paths (I think!).
I’ve got Html.EditorFor mapped to a DateTime field yet only a normal textbox gets displayed. It’s as if the new control isn’t doing it’s overriding job. Am I missing any .css or script files Andrei?
Cheers for your help,
Pete
#9 by PeterG at May 23rd, 2011
| Quote
P.S. It’s MVC 3
#10 by Ryan at June 14th, 2011
| Quote
Thank you Andrei. Everything works great in IE. Is there any way to convert these to work in other browsers like FireFox consistently without any issues?
#11 by james at June 16th, 2011
| Quote
look forward to the series. I especially am interested in the “Areas” part of your series.
I tried to use them a while back (early preview), but there still seemed to be things to be ironed out.
I had wanted to use an Area to slowly migration from ASP.NET WebForms project to ASP.NET MVC. I was trying to put all the MVC stuff (MasterPages, CSS, Styles, Views, Controllers, Models, etc…) in an Area while keeping the WebForms stuff in the main root project.
It seemed like a good idea at the time, but I had strange issues. Possibly I was using an Area for the wrong thing.
#12 by James at June 19th, 2011
| Quote
>>>>>>>> That looks so clean. So would I be able to assume it’s a two way binding on both response request?
Glad you like it! The helpers can be used to help assist with two-way binding. In my next blog post I’ll cover some of the new validation features of ASP.NET MVC 2 – which will help provide a better sense of how end to end input works.
Hope this helps,
Scott
#13 by James at June 24th, 2011
| Quote
look forward to the series. I especially am interested in the “Areas” part of your series.
I tried to use them a while back (early preview), but there still seemed to be things to be ironed out.Thank you Andrei. Everything works great in IE. Is there any way to convert these to work in other browsers like FireFox consistently without any issues?which will help provide a better sense of how end to end input works.
Hope this helps,
#14 by james at June 25th, 2011
| Quote
When using the template helpers in ASP.NET MVC, e.g.
Html.EditorFor(x => x.Property)
the rendered Html with have a capitalized ID – matching my property name.
In order to standardize the ID’s of all html elements I want this to be lower case. Rather than specifying the ID manually – which won’t get updated if I rename my property, I’d like to establish a convention.
I’m sure I read this was possible somewhere and I’m currently scanning the interwebz to find it. But if anyone can help me and save me time, that would be awesome.
#15 by Allen at June 29th, 2011
| Quote
EditorTemplates
DisplayTemplates
calendar.gif
all added and imported.
I had a problem with the datetime field same as the issue above. The normal textbox gets displayed. I was thinking that I am missing something like .css. after reading and some research I got it all figured out! Thanks for this andrei!
#16 by Manu at December 23rd, 2011
| Quote
I can’t make it show up, using MVC3, I spent this entire night fighting wit it.
If someone has a solution, please share, thank you so much!
#17 by Manu at December 23rd, 2011
| Quote
I finally found it… on the Layout page I had this include:
Changed it with 1.6.2 and all worked like expected.
Maybe this note will save time and nerves to somebody else.
#18 by Antti at September 24th, 2011
| Quote
Thank you! If only I had found your post a couple of hours earlier…