August 30th, 2010

String to DateTime, FormatException and ASP.NET

There are lots of bugs/errors due to improper handling of datetime. Sometime we don’t know the production server regional settings or the culture information. It may different from the development area. Thus this yields the errors on deployment if not handled properly. See one example:

August 30th, 2010

Display Hierarchical Data with TreeView in ASP.NET 2.0

When there are no Large Amounts of Data then it is not good to connect database, fetch data and add to treeview node again and again for child/sub nodes. It can be done in single attempt. In following example, ID=-1 for root nodes.

August 30th, 2010

Add Dynamic Buttons and Handle click event on server side in ASP.NET

Generally, it is required to generate buttons dynamically. Suppose user selects some items we have show all user selected item in cart where user can reject selected item. So we require to show remove button dynamically. So our object is to generate buttons dynamically and Handle click event on server side.

August 29th, 2010

Create Windows Service quickly using .NET

Generally some tasks are required to be scheduled or dependent on the time. So this can be performed easily using windows service. Here are the steps to create windows service quickly.

August 29th, 2010

Custom role provider based sitemap navigation in asp.net

Object: Most ASP.NET Applications implement roles to deal with role permissions and security. Sometimes, it is required to keep existing database structure to manage Roles. So, custom role provider is used for this. Here are the steps to implement navigation based on the custom role provider.

August 28th, 2010

How to set or test connection string

For a developer, the MOST COMMON problem is the database connectivity. The most common reason is wrong connection string. Here are the steps to test connection string and see connection problem.

August 28th, 2010

Create Dynamic DropDownLists in asp.net

Object:
1. Create dropdownlist dynamically with autopostback property true
2. Keep dropdownlist during postback
3. Maintain selected value during postback.
Here is the sample for this.

August 28th, 2010

Retrieve value of Dynamic controls in asp.net

The main object of this article is to access value of dynamic asp.net controls which are generated conditionally. For this, we will save viewstate of dynamic controls.
Suppose we have one dropdown and one button. When user selects “Generate” option, the Dynamic table will be generated. In each cell of table there will be textbox. User enters value in the textboxes and click on button then it will display all user entered values.

August 27th, 2010

Windows Form Localization in .NET

This article explains the steps to implement localization for windows app using .NET

1. Design the interface by using table layout panel.

2. Change the localizable property of form to true.

August 21st, 2010

Mac/iphone Style Dock menu for your website

I like Mac OS X dock menu and decided to write an article to add this type of dock menu in the website/blog. In this article, I will cover a few ways to add dock style navigation menu for your website.