Tool Pick #1

by Rohit 10. March 2012 00:18

 

    • Drone .NET Profiler: Provides both trace and memory profiling. Discover performance bottlenecks and memory leaks.

 

    • OnTime : Bug Tracking plugin for Visual Studio.

 

    • Source Code Outliner PowerToy : A Visual Studio 2008 extension that provides a tree view of your source code's types and members and lets you quickly navigate to them with filtering inside the editor.

 

    • Spritely: A light-weight jQuery plugin for creating dynamic character and background animation in pure HTML and JavaScript.

Tags: , , , ,

Technology | Tool Pick

PetaPoco: Binding a GridView with PetaPoco query result.

by Rohit 2. March 2012 19:46

PetaPoco is a simple but fast tiny ORM. It is not a full-fledged ORM like NHibernate but a no-fuss easy implementation of ORM. It is a single C# file which you can attach in your project. You can even use NuGet to directly download and integrate it in your project.

PetaPoco has some interesting features like:

  • Support for T4 templates to generate schema from POCO  classes.
  • Retrieve paged results automatically.
  • SQL support. No need for strict Linq syntax.
  • Fast.
  • No external dependencies. Comes as a single C# file.
  • Rather than using automatic mapping, you can use ExplicitColumns attribute to show only the columns to be mapped.

In this post I show you how to query a table using PetaPoco and how to bind a GridView with the result. As discussed above, here I prefer to use ExplicitMapping of table and individual column.

More...

Tags: , ,

Technology

Changing default date format of your ASP.NET application

by Rohit 1. January 2012 12:14

I messed with this issue for about a month. I recently migrated an old ASP.NET 2.0 application on a private server with Windows 2008 Server R2 Enterprise OS installed. The application consists of few entry forms where date is to be entered in dd/mm/yyyy format. This application has a TextBox to enter the date and not a DateTime picker. Sometimes DateTime picker is not easy to work with when you need to enter old dates often and if you want to keep it null sometimes.

ASP.NET shows error: “Input String was not in a correct format” when date is entered in dd/mm/yyyy format. I re-checked SQL Server documentation, changed SQL Server’s default language for default login (though not recommended), but nothing seemed to solve the problem.

My last workaround with IIS Settings solved the issue.

I am using Windows Server 2008 R2 which comes with IIS 7. Open IIS and right-click the virtual directory of your application.

More...

Tags: , , ,

Technology

Handling nasty Crystal Reports issues

by Rohit 19. December 2011 21:34

With this article, I am starting a small series of tips and tricks to handle few irritating issues of Crystal Reports. This post covers a couple of issues:

Issue 1:  Crystal Report Viewer's Print and Export button not working.

Solution: This is a bug which is addressed by Crystal Reports Service Packs. If you are using Crystal Reports from within Visual Studio, you need to download Crystal Reports for Visual Studio service pack. There are a couple of Hot Fixes and Security Updates released to patch further issues:

More...

How to make JQuery work with ASP.NET Web Content Form?

by Rohit 6. May 2011 16:50

In an ASP.NET application, making JQuery work with a Master Page and Web Content Form is often a matter of confusion for beginners. Since the Web Content Form doesn't have a HTML HEAD section, novice programmers often get baffled on where to put references to JQuery necessary files and CSS files.

Below I show you how simply you can make JQuery work in an application with a Master Page and a Web Content Form. To make this example work, you need to download few files and add their references to your Visual Studio project. This example uses Visual Studio 2008 with .NET Framework 3.5 SP1.

JQuery core file needed

jquery-1.5.1.min.js

You can download this file from JQueryUI website.

JQuery DatePicker plugin

I am taking a JQuery DatePicker plugin from Keith Wood's blog.

A DatePicker can easily be added as a popup to a text field or inline in a division or span with appropriate default settings. The popup shows when the field gains focus and is closed by clicking on the Close link or clicking anywhere else on the page. You can also remove the DatePicker widget if it is no longer required.

We need two files of this plugin to display a simple DatePicker:

jquery.datepick.js, and
jquery.datepick.css

To start with:

  • Create a simple ASP.NET website using Visual Studio. As I said before, I am using Visual Studio 2008 for this example. (You can try this example with the latest version as well, but I have not tested this example on the latest version.)
  • Add a Master Page [In this example it is named: Master1.master]
  • Add a Web Content Form. Don't forget to link it up with the Master Page, Master1.master, we added above.

This is how the Solution Explorer on my desktop looks like:

More...

About Rohit

I have a tremendous passion for software. My day job at a Fortune 100 company exposes me to all sorts of .NET and SQL Server tasks, but my passion drives me to explore other technologies as well. I recently fall in love with Ruby on Rails and in my spare time trying to explore it. Previously I have worked on PHP as well.

I am one of the technical reviewer of Aptana Studio Beginner's Guide which recently got published through Packt Publishing.

My personal blog is with the name My Days Uncovered
 
You can either use Contact Form or mail me directly at:
 
rohit [at] irohitable [dot] com

Month List