Just so others don’t tear their hair out, it seems the xVal client side validation call Html.ClientSideValidation<TModel> converts (all?) non-A-Z characters to an underscore, I knew dots needed to be replaced for underscore, but it seems square brackets need this as well.
So:
<%= this.TextBox(“Supplier.SupplierAddresses[" + Model.CurrentRowIndex + "].Address.Postcode”).Value(Model.SupplierAddress.Address.Postcode).Class(“postcode”).MaxLength(4)%>
<%= Html.ValidationMessage(“Supplier.SupplierAddresses[" + Model.CurrentRowIndex + "].Address.Postcode”)%>
Needs:
<%= Html.ClientSideValidation<Address>(“Supplier_SupplierAddresses_” + Model.CurrentRowIndex [...]
If you guys haven’t seen this terrific jQuery Watermark Plugin go check it out over here.
I just installed it today and found a nice way to watermark all my input boxes by a neat jQuery .each() trick. If you’ve used this plugin but got a bit annoyed having to invoke the watermark and set [...]
Hi guys, today I would like to present two easy ways in which to present a confirm dialog to the user (such as “Are you sure you wish to delete this item?”) from a button or link click before performing a particular action on your ASP.NET MVC website. If you are already somewhat familiar with [...]
I don’t have a lot of time to blog about this, and it is something I wanted to blog about weeks ago, so while I have the links on hand, here are the links I used to move away from ASP.NET MVC’s built in Ajax methods utilising the Microsoft Ajax JavaScript library (you know, your [...]
Please see my newer article here.
Well if you did not hear, JQuery v1.3 was released on the 14th of this month which coincides with their three year anniversary, and is jam packed with a couple of neat new features, for all others check out the full release notes:
Sizzle: A sizzlin’ hot CSS selector engine.
Live Events: Event delegation with a jQuery [...]
Below is a real good reason to compile a well-formed JSON data structure if you are about to send data through ajax with jquery, as sometimes (like today of course) you can receive undesirable and unexpected results if you take the cheap and nasty option of a simple serialised data string. I thought this [...]
After looking on the net and not being completely satisified with the solutions out there on formatting to this style, I headed over to trusty stackoverflow.com and did really like the one Jeff Atwood and the team use on stackoverflow.com, until I saw the more concise version down below.
Mind you this is the one I [...]
Filed in .NET
|
Also tagged
|