Geeks With Blogs
Etienne Giust's .NET notes Some .NET tips and tricks for me to remember. That might help you too April 2012 Entries
Apply a DateTime Format in an Asp.Net MVC TextBoxFor
I use MVC4 with razor. I ran into the problem of formating correctly a DateTime property of my model that I render in the view using a TextBoxFor MVC helper. The default formatting displays the full date with hours, minutes and seconds : @Html.TextBoxFor(m => m.BeginDate) displays “27/04/2012 00:00:00” in the textbox. I only needed the first part so I wanted to use the ‘d’ format. I then tried to use DataAnnotations to impose a format to the property to display: [DisplayFormat(DataFormatSt... ......

Posted On Friday, April 27, 2012 12:58 AM

JQueryUI Accordion : “OnSelected” trigger and get selected “value”
I was looking for a kind of onselected trigger for the JQueryUI accordion (v 1.8.11). The proper way to do this is to use the “change” event of the accordion : <script type="text/javascript"> $(document).ready(function () { $("#accordion").accordion({ change: function (event, ui) { alert("changed!"); } }); }); Now, you might want to get the selected pane index. This is quite easy too : <script type="text/javascript"> $(document).ready(function () { $("#accordion").accordion({ active: ......

Posted On Wednesday, April 25, 2012 10:31 PM

Copyright © Etienne Giust | Powered by: GeeksWithBlogs.net