Category: ASP.NET

Reading Excel 2003 and 2007 Files Using OLEDB

Reading Excel 2003 and 2007 Files Using OLEDB

January 30, 2009 | By | 45 Comments

One of the feature of the application I’m working on these days is allowing the user to import data from Excel 2003 and 2007 files. After some research I found out that OLEDB is the only way to read both Excel formats without any problems.

Continue Reading

2 Ways to Confirm Deletion in an ASP.NET GridView

2 Ways to Confirm Deletion in an ASP.NET GridView

January 20, 2009 | By | 2 Comments

When a GridView is used to display and manipulate data, the Delete button can be displayed next to each record to easily delete a single record, or at the bottom of the GridView to delete multiple records at once. I will show in this post 2 ways to implement the former.

Continue Reading

404 and 403 Error Pages in ASP.NET

404 and 403 Error Pages in ASP.NET

January 12, 2009 | By | 3 Comments

The 2 most common HTTP errors that occur are the 404 and 403. 404 is the File Not Found error and it is generated when the user clicks on a broken link or enters a file or folder name that does not exist in the server.

Continue Reading

Encrypting Sections of the Web.Config File in ASP.NET

December 31, 2008 | By | Add a Comment

In most cases some sections of the web.config file of an ASP.NET project need to be encrypted before moving project to a production server. The most important section to encrypt is the connectionString, because of the login information it contains. Here is a quick way to encrypt the sections you want, without adding or changing […]

Continue Reading

Moving the aspnetdb.mdf Database to a Production SQL Server

Moving the aspnetdb.mdf Database to a Production SQL Server

December 17, 2008 | By | 12 Comments

One of the least documented features in ASP.NET is the way to move the user access and profiles tables in aspnetdb.mdf to a production SQL Server. Although aspnetdb.mdf can be used in production, it is not recommended. This is done in 2 steps, first create the structure (tables, views and stored procedures) in the database, […]

Continue Reading

Creating Your Own Travian Utilities

Creating Your Own Travian Utilities

December 13, 2008 | By | 9 Comments

Travian the well known browser game has a downloadable file for developers in each of its servers that provides details of all the players of the server. The file contains a list of SQL INSERT statements, one for each player. Although the statement doesnt provide military or attack information, that can be used to cheat […]

Continue Reading

Using Microsoft Office’s OCR Engine

Using Microsoft Office’s OCR Engine

December 11, 2008 | By | Add a Comment

The Microsoft Office Document Imaging library that is provided with Office 2003 and Office 2007, has Optical Character Recognition (OCR) that can extract text and layout from image files. As you can see from the code below, it doesnt need much to use it.

Continue Reading

Get a Video File’s Details Using Windows

Get a Video File’s Details Using Windows

December 7, 2008 | By | 9 Comments

I searched alot for a way to get details of a video file, without the need of a third party component. Im developing a video library on my free time, and I wanted the user to get this data automatically after selecting the video.

Continue Reading

An MD5 Hash of a String

An MD5 Hash of a String

December 5, 2008 | By | 1 Comment

MD5 hashing can be used as a quick and easy way to check if a string was changed or not. I created a class to let me get the hash or verify it with 1 line of code.

Continue Reading

My ‘Contact Us’ Idea

December 3, 2008 | By | Add a Comment

I thought of this solution when I was developing a website, and I was testing the contact us page. It was supposed to send an email with the details the user filled. But the emails were always late. So I created a table in the database of the application and saved the sent data there. […]

Continue Reading