Convert t formatted time string to TimeSpan

by Tom Hundley 6. February 2014 08:28
Problem I am using the Kendo UI TimePicker for a TimeSpan property of my model.  My first problem is that the value of the TimePicker is not getting picked up by my view model, even though everything is named correctly.  My second problem is when I get the value from the form data, it is formatted as a string, such as “11:00 AM”.  I was struggling to try to get this string into a TimeSpan type in C#.  Note the TimeSpan type in C# is the mapping to the Time type in S... [More]

Tags:

Telerik | C# | ASP.Net

Kendo UI MVC Grid not Refreshing on IE

by Tom Hundley 6. February 2014 06:43
Problem I have a standard Kendo UI MVC Grid binding to a remote data source via Ajax and WCF Data Services / OData.  When items are added to the data source or items are edited and I redirect to the action and view containing the grid, the grid refreshes perfectly fine in Chrome and Firefox.  It does not, however, refresh in Internet Explorer 8, 9, or 10.  I have not tested 11, but I assume the behavior is the same. Solution This appears to be a caching issue.  Disabling t... [More]

Tags:

ASP.Net | Telerik

What I do to ensure quality in the software I build

by Tom Hundley 25. September 2013 05:15
I was recently asked to send a response to this question to a recruiter for an interview prescreening.  I decided to put a little more though into my answer than the few bullet points you might typically expect.  How do you ensure quality in the software you create? This is a great, albeit a very loaded, question. One could easily write a series of books to address just this one topic alone. That said, I’ll attempt to be brief and concise, yet comprehensive in my answer. To begin, I... [More]

Getting the value of a text box from Selenium

by Tom Hundley 26. April 2013 07:55
This isn’t really a big deal to figure out, but there aren’t a lot of good posts about it so I figured I’d put one up. Problem I needed to get the value of a text box from Selenium.  My intuition told me that the “Text” property off the IWebElement interface would do it.  Nope… it just returns the inner html of the element, which isn’t what you’re looking for in as the value of a text box. Solution Use GetAttribute(“value”).&... [More]

Tags: ,

ASP.Net | Test Automation

The Open Closed Principle: A Simplified Example

by Tom Hundley 14. March 2013 06:03
You’ve no doubt heard of the application architecture acronym, “SOLID”.  Bob Martin (Uncle Bob) came up with this as a guideline for application architecture.  The acronym stands for: Single Responsibility Principle (a class should have one and only one reason to change) Open Closed Principle (a class should be open for extension but closed for change) Liskov’s Substitution Principle (subclasses implementations should do what you expect them to do) Interface Segregation... [More]

Tags: ,

Application Architecture | C#

Selenium ElementNotVisibleException: Cannot click on element

by Tom Hundley 10. January 2013 09:35
Problem Statement I am using the Selenium WebDriver to click on a menu item which is not visible until you hover over a top level menu, and when I invoke the Click method on the IWebElement, an ElementNotVisibleException is thrown with the message of Cannot click on element. The problem is that I have made the IWebElement visible by hovering over the top level menu.  It is, in fact, absolutely visible, thus this exception should not be thrown.  The Click method works just fine o... [More]

Tags: ,

Test Automation

Activate Windows 8

by Tom Hundley 16. August 2012 07:30
It's Christmas morning for Microsoft nerds!  Windows 8, Visual Studio 2012, and Team Foundation Server 2012 RTM versions were released to MSDN today!  Woot!  I downloaded Windows 8 Enterprise RTM Build 9200 from MSDN and installed it.  I must not have been paying attention, because I didn't see anywhere for the Key.  Anyway, after I finished a very painless installation and tried to "personalize my pc", I was informed that "You need to activate windows before you can per... [More]

Tags: ,

Windows 8

WCF Service References not generating web.config client endpoints and bindings

by Tom Hundley 7. December 2011 14:57
Problem I hate to admit it, but I spent a few hours pulling my hair out on this one.  I created a new WCF Service and added a few services.  I then added a service reference to some small consuming applications and everything worked fine.  I then added a service reference to a large website which has about ~50 referenced assemblies.  This time when I did it, my web.config serviceModel section wasn’t updated by Visual Studio 2010.  Normally, Studio will generate bin... [More]

Tags: ,

Visual Studio | WCF

Team Explorer 2008 and TFS 2010

by Tom Hundley 21. July 2011 08:35
Forward Compatibility Update Imagine a hell where you’re forced to use VS 2008 in 2011. Such is my life right now. It’s not all bad, however, because we’re implementing TFS 2010. I discovered some nuances getting Team Explorer 2008 to work with TFS 2010.   The standard steps are these:   1. Install Visual Studio 2008 Service Pack 1 (VS 2008 SP1) 2. Install the Visual Studio Team System 2008 Service Pack 1 Forward Compatibility Update for Team Foundation Server 2010 (... [More]

Tags:

Team Foundation Server | Visual Studio

Implementing CLR User Defined Function (UDF) in SQL 2008 R2

by Tom Hundley 21. April 2011 07:05
Implementing a CLR User Defined Function (UDF) in SQL 2008 R2 is very easy.  Note that this code is not limited to 2008 R2 or UDFs, and implementing CLR stored procedures is just as simple.   The steps are as follows:   1.  Create you class with all desired methods / functionality. Note that your classes and methods should be static!   2.  Add appropriate attributes to the methods you want to utilize as CLR objects.  For a UDF, you add the [SqlFunction] attribu... [More]

Tags: , ,

C# | SQL Server