Posts

Showing posts from April, 2014

Book Review : Reporting with Visual Studio and Crystal Reports

Image
Again Marketing Team of Packt Publication (Jay Raval) has contacted me to review a book called “Reporting with Visual Studio and Crystal Reports” and I always have fun to review books so I said yes to them.  This blog post is all about reviewing a book “Reporting with Visual Studio and Crystal Reports”.


Enum support for views in ASP.NET MVC 5.1

Image
Recently before some time Microsoft has announced release of ASP.NET MVC 5.1. It’s comes with tons of feature and  Enum support is one of them. In the earlier release of ASP.NET MVC there was no direct support for the Enums and in the views but with ASP.NET MVC 5.1 Microsoft is providing directly @html.EnumDropDownList for which directly creates a dropdown from the Enum itself. So What we are waiting for. Let’s take an example.

Example of Enum support for views in ASP.NET MVC 5.1:

Let’s create a new empty project for ASP.NET MVC from Visual Studio 2013 like following from File Menu-> New Project

Test Driven Development is your friend

Image
I have seen lots developers are not seeing benefits of Test Driven development. When you do Test Driven development there are lots of benefits. So I thought it will be good idea to write a blog post about it.

What is Test Driven Development:

As per wikipedia Test Driven Development is

Test-driven development (TDD) is a software development process that relies on the repetition of a very short development cycle: first the developer writes an (initially failing) automated test case that defines a desired improvement or new function, then produces the minimum amount of code to pass that test, and finally refactors the new code to acceptable standardsKent Ben an American software engineer and creator of extreme programming rediscovered this technique. There are three main indicators of Test Driven development.

Creating a WordPress blog on azure websites

Image
In this post we are going to learn how we can create WordPress blog with Azure web sites.

What is Azure Web Sites?

Before some time Microsoft has released Azure web sites for South East Asia region. Windows Azure web sites offers secure and flexible deployment and scaling options for any kind of web application. You can use your existing tools to create and deploy applications to Azure Websites.

Windows Azure web site provides following features.
Provision and deploy fastSecure platform that scales automaticallyGreat experience for Visual Studio developers. Even you can edit some code with online visual studio(Monaco).Open and Flexible for anyoneMonitor and AlertAuto scale to optimize cost and performanceA great gallery of most popular applications and easy direct deployment.

Visual Studio 2013 Cookbook review

Image
The marketing team from Packt Publication has given opportunity to Review Visual Studio 2013 Cookbook. So, this post is all about  reviewing Visual Studio 2013 Cookbook . It’s total 333 pages of long book with full converge of visual studio features.


About Authors:

This book is written by Jeff Martin and Richards Banks both are quite experience person.

Jeff Martin is well known technology enthusiast and has been contributing writes for InfoQ(www.infoq.com) for over two years focusing on Microsoft .NET and related  platforms.  Readers are encouraged to follow @VSDevTips on twitter to receive updates of books and visual studio related stuff.

Richard Banks have more then 20 years of experience in software development. During his career his gone through various role like developer, team lead, project manager,CIO and CTO. He is a professional scrum trainer and runs Sydney ALT.NET user group and spoken at number of Microsoft events. You can find him on his blog http://www.richard-banks.org/

How to convert C# object into JSON string with JSON.NET

Image
Before some time I have written a blog post – Converting a C# object into JSON string in that post one of reader Thomas Levesque commented that mostly people are using JSON.NET a popular high performance JSON for creating for .NET Created by James Newton- King. I agree with him if we are using .NET Framework 4.0 or higher version for earlier version still JavaScriptSerializer is good. So in this post we are going to learn How we can convert C# object into JSON string with JSON.NET framework.

Dapper Micro ORM Series

Recently before some time I have created a blog post about list of blog post I have written about Petapoco Micro ORM. So one of the friend suggested I should write same kind of series post about Dapper Micro ORM so that reader of my blog can find the all the posts on same page. So that’s why I writing this blog post.

What is dapper:

Dapper is Micro ORM developed by Sam Saffron few years ago while he was working as lead developer at stack exchange. This ORM was developed specially for Stack Exchange QA sites like stackoverflow.com and superuser.com for the performance improvement. It has got a single file where all the code has been written. You can download dapper Micro ORM from the following location.

http://code.google.com/p/dapper-dot-net/

Dapper Micro ORM related posts on dotnetjalps.com:

Following is a list of post related to dapper Micro ORM that I have written on this blog.

Playing with dapper Micro ORM and ASP.NET MVC 3.0
Insert with Dapper Micro ORM and ASP.NET MVC 3
Edit/Update w…

Converting a C# Object into JSON string

Image
Some people might think why I am writing so much about basics but the things but in reality  I got lot of questions through email and other communities about very basic things. So I thought instead of replying them into single thread. It is a good idea to write blog post about it and as a result I am writing this blog post.

In this post we are going to learn how we can convert a object into JSON string It is very simple. Let’s first see how we can convert C# Object into JSON string.

Converting a C# object into JSON string:
So to demo this, I have created a employee class like following.

public class Employee { public string FirstName { get; set; } public string LastName { get; set; } }
Now let’s create object of this class and assign some value like following.

Employee employee=new Employee {FirstName = "Jalpesh", LastName = "Vadgama"};
For this demo we are using console application so we have to add System.Web and Sy…

ASP.NET Checkbox button Attributes in JavaScript.

Image
This is a follow up post I have just written before some time- Getting tooltip of ASP.NET Radio button in java script. In that post I have explained that to render all properties properly in ASP.NET renders checkbox and radio button surrounded by Span tag. So one of the friend message me on facebook how we can add JavaScript attribute on ASP.NET Controls like checkbox or radio button. So I thought it will be good idea to write a quick blog post about it.

Adding JavaScript attribute to ASP.NET Checkbox and Radio button:
So Let’s see how we can write JavaScript attribute from server side with ASP.NET Checkbox and same will be applied to ASP.NET Radio button also. Following is a HTML code for ASP.NET checkbox.

<asp:CheckBox runat="server" ID="myCheckBox" Text="Yes" ToolTip="Yes"/>
Now I want to write a onBlur event for JavaScript so I have written a following function in JavaScript.

function onBlur() { alert('Onblur Fired'); }
Norma…

Getting tooltip of ASP.NET Radio button in java script.

Image
This post in regards to a question that I have answered on stack overflow. Getting Tool tip of the Radio button in JavaScript. Where user asks why he is not able to get tooltip with document.GetElementById and Client Id of ASP.NET Radio button control like following.

document.getElementById('<%= rbSelectedIds.ClientID %>').title
While answering this question, I have found that there are lots of people not aware about this. So I thought it is a good idea to write a blog post about it.

By default ASP.NET Radio button and check box controls rendered under span when you have attribute like tooltip. Because System.Web.UI.WebControls namespace may render differently in  different browsers and to achieve same functionality in all the browsers they are rendering with span.

There is a complete discussion there one in one of the StackOverFlow.com

Why does ASP.Net RadioButton and CheckBox render inside a Span?

Example : Getting ASP.NET Radio button tooltip in JavaScript:
So let’s tak…

Overriding/set default button in master page in asp.net

Image
Some time ago I have written a blog post about Default focus and default button in ASP.NET. In that post I have explained how we can set default button for form. Recently I got email related to that post asking that how we can set or override default button on a page with master page. 

In this page we will learn how we can override default button in master page. So what we are waiting for? Let’s start by creating a an asp.net empty application via File –> New Project –> ASP.NET Empty web application.



Once You are done with creating project it’s time to add a master page in solution via right click-> Add new Item.



Following is HTML code ASP.NET master page.

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs" Inherits="MasterPageDemo.Site1" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <…