Invisible character when parsing DateTime

Invisible character when parsing DateTime Today we faced a crazy situation. we have a piece of code in one of our applications which parses date and time value entered into a text box. Being lazy/smart developers we normally copy paste the sample value from the help file in order to test it. but crazy part was that when we copy paste it, .net could not parse the value throwing exception saying that the string was not in correct format. but if we typed exactly the same value it would work! aha let me copy paste both values into notepad and compare them char by char. ok they are exactly the same. ...

March 14, 2012 · 2 min

ASP.Net WEB API VS WCF Service

ASP.Net WEB API VS WCF Service Well as soon as i heard and read about asp.net web api, i was very excited about it but in between i had that mmmmm moment. i was like, this is great but what about WCF? I am not going to create any WCF services anymore? so I had think again about it but could not find any concrete answer as these two are overlapping in many areas. so I had to do a bit more R&D about the differences and I came across this blog post from Matt Milner. ...

March 11, 2012 · 1 min

Make a call to a JSON/XML ASP.Net WEB API from server code

Make a call to a JSON/XML ASP.Net WEB API from server code There is plenty of articles out there on how to make a ajax call to a asp.net web api service. but what if you want to make a call to the same service from a server code? this can happen because of various reasons like when you want to offer a service and use IP validation. anyway this is quite simple to call a service exposed by ASP.net WEB API either using JSON or XML. and it is like calling a WCF or XML web service from a server side code without adding a reference to the service. ...

March 11, 2012 · 3 min

The Visual Studio 2011 Fakes Framework

The Visual Studio 2011 Fakes Framework I was just reading this blog post about Unit Testing Improvement in Visual Studio 2011 and noticed that there is something new called Fakes Framework. I didn’t get it first time so I had to read it again and also had to read this MSDN article to get my head around it. I mean I was getting so excited about it that I had to read it twice to make sure I have understood it properly. then I went like wow that’s great. now I can test old SharePoint code without TypeMock. ...

March 10, 2012 · 4 min

ASP.NET Web API

ASP.NET Web API I am a huge fan of Ajax. If you want to create a great experience for the users of your website – regardless of whether you are building an ASP.NET MVC or an ASP.NET Web Forms site — then you need to use Ajax. Otherwise, you are just being cruel to your customers. Most of the new websites expose data from the server as JSON and use jQuery to retrieve and update that data from the browser. ...

March 8, 2012 · 5 min

ASP.Net Page Lifecycle Events

ASP.Net Page Lifecycle Events We all know a asp.net page events, but do we exactly know the orders? and what each event is good for? well I am putting this list together to talk about the events. PreInit * use this event to: Set a master page dynamically.+ Set the Theme property dynamically.+ Read or set profile property values.* Init* Use this event to read or initialize control properties* InitComplete* Use this event to make changes to view state that you want to make sure are persisted after the next postback.* LoadState* * ProcessPostData* * PreLoad* * Load * * LoadComplete * * PreRender * if you have got custom controls on your page and you want to manupulate the final page output based on some values in a custom control, you need to put your logic in this event.* SaveState * Any changes to the page or controls at this point affect rendering, but the changes will not be retrieved on the next postback.* Render Written by vahid ...

March 7, 2012 · 1 min

Why I believe in lean software development

Why I believe in lean software development Few weeks ago I got myself an Amazon Kindle to facilitate book reading and hopefully get back my reading habits. I am so amazed by the device that today I twitted “it’s my best gadget”. now there are very genuine reasons behind the twit. it’s meant to be used to read books and it does it perfectly. it has a great screen which is optimized for the reading. does not hurt your eyes. you can read books even in the direct sunlight. it’s handy and light so very easy to carry with you it’s got a long lasting battery life bot built in dictionary which is extremely easy to use has got a great search functionality has got wireless connection so that Amazon can push the books immediately to the device it’s very very easy to use I have just mentioned couple of it’s great features. don’t get me wrong, I don’t work for Amazon and I am not doing any promotion for the Kindle. the moral of what I have mentioned above it that IT DOES WHAT IT IS SUPPOSED TO DO AT IT’S BEST. ...

March 7, 2012 · 3 min