Geeks With Blogs

News
Programmers are tools for converting caffeine into code.

dotNed blogger


Bob Goedkoop Programming C# on Microsoft's .NET plaform July 2013 Entries
Mod 97
Technorati Tags: .NET,C#,IBAN,SEPA,Mod97 For my current project we need to validate IBAN numbers. IBAN numbers are validated with an ISO 7064 mod-97-10 calculation where the remainder must equal 1 static public bool Validate(string iban) { // pre-conditions if ( string.IsNullOrEmpty( iban ) || (!Regex.IsMatch(iban, "^[A-Z0-9]") ) ) { return false; } // clean-up IBAN iban = iban.Replace(" ", String.Empty); // 1.Move the four initial characters to the end of the string string iban2 = iban.Substring(4, ......

Posted On Thursday, July 4, 2013 1:25 PM

Using data-* attributes in ASP.NET MVC
Technorati Tags: .NET,Razor,C#,MVC,HTML Starting from MVC 3 and up this issue has been addressed. From MVC 3 and up underscores in HTML attributes are automatically converted to dashes. Here’s an example: @Html.TextBox( "tbxOne", "", new { @data_id = "someId", @style= "width:120px; text-align:right;" }) This wil result in: <input data-id="someId" name="tbxOne" type="text" value="" /> ......

Posted On Wednesday, July 3, 2013 1:02 PM

Copyright © Bob Goedkoop | Powered by: GeeksWithBlogs.net