Skip to content

Tag Archives: C#.Net

Import Data from Excel using C# – Part 2

16-Feb-10

In my web application, we used to import data from MS Excel file. Few days before one of the client representative posted an issue that he can’t import data from XLSX (MS Excel 2007 File Format) files. Previously we were using OLE DB provider to import data from Excel file (Checkout my previous post regarding [...]

File Uploader using Silverlight and WCF

06-Jan-10

From Silverlight 2 onwards it supports Open File Dialog, which helps developers to implement upload file logic, with the help of WCF services. Silverlight Open File Dialog offers better control over the existing HTML FileUpload control, like File Filter, File Sizes etc, and it can be managed from client side. Here is a simple implementation [...]

Http Compression in ASP.Net

05-Jan-10

Yesterday I got a chance to attend web performance optimization team meeting, and they suggested, HTTP Compression will help to reduce the Bandwidth and thus improves the performance. Later I come to know some of other teams in my organization are using these techniques in their web applications. I found few implementations, and the code [...]

Enumerating Instances of SQL Server using C#

18-Dec-09

One of the project I am worked, I had to enumerate SQL Server instances of the network for creating dynamic connection string. Here is a code snippet which will retrieve all the SQL Server instance in a network using C# and ADO.Net.

using System.Data;
using System.Data.Sql;

SqlDataSourceEnumerator sqlDataSourceEnumerator = SqlDataSourceEnumerator.Instance;
DataTable sqlServerInstances = sqlDataSourceEnumerator.GetDataSources();

The Data Table contains 4 columns, [...]

WebCam in your applications using C#

16-Nov-09

In the current project I am working I got a chance to implement web cam image capture. There is two different ways to do this in C#.

Using WIA Sdk – It is library coming with Windows. And you can download this COM library from Microsoft site. But the problem of this approch is sometime the [...]