Aug 30, 2010

Sharepoint search in document library/list programmatically (using C#)

In sharepoint, it is generally required to limit search to a particular list or document library and display metadata properties. The example below shows an example FullTextSql query using the PATH managed property to limit your search to a particular list, and then the results are used to create the list item. You can bind results to gridview and can show metadata properties.You need to pass document library url and search text in the following method:

Aug 30, 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:

Aug 30, 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.

Aug 30, 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.

Aug 29, 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.

Aug 29, 2010

Custom role provider based sitemap navigation in

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.

Aug 28, 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.

Aug 28, 2010

Create Dynamic DropDownLists in

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.

Aug 28, 2010

Retrieve value of Dynamic controls in

The main object of this article is to access value of dynamic 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.

Aug 27, 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.

Aug 21, 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.