Upload binary data the Database

Submitted by planetsourcecode on
Some times we have the requirement to upload an image to the database in binary form. As uploading a image file to the database has many different benefits as compare to uploading files to the Web Server Folders So let’s starts from the database table design The fields includes in table are: 1) ID – Primary Key 2) Filename – Store name of the file. 3) Mime- what type of file is it.

Using Multiple .Config Files in ASP.NET

Submitted by planetsourcecode on
We can include multiple configuration files in our asp.net application, these things provide a feasibility to the use to work in more robust environment. The usage of multiple configuration file makes the application more secure and manageable Web.confi exposes an element that can be used as a place to store application settings like connection strings, file paths, etc.

How to generate a Random number using RNGCryptoServiceProvid

Submitted by planetsourcecode on
We can easily generate a unique Random number by using the inbuilt class "RNGCryptoServiceProvider".For doing this simply add class namespace to the header of the code-behind. using System.Security.Cryptography; write a simple function "GetUniqueKey" private string GetUniqueKey() { int maxSize = 8; int minSize = 5; char[] chars = new char[62]; string a;

ASP.NET Validation Tips and Tricks (Part1)

Submitted by planetsourcecode on
Tips1# Validate an IP address We can easily validate an IP address by Adding Namespace using System.Text.RegularExpressions; public class IPAddressTextBox: RegExTextBox { public IPAddressTextBox() { InitializeComponent(); this.ValidationExpression = @"^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$";

Import Excel Data to MSSQL Sever 2005 with ASP.NET

Submitted by planetsourcecode on
Some time we got stuck in some situation in which we have to import large amount of data into the database but it can be cumbersome task if it is entered from a web form. This type of problem can be solved by importing excel data into MS-SQL Sever database. Let me explain the thing one by one

Exception Handling

Submitted by admin on

What is an Exception?

Definition:

“When an unusual, irregular, abnormal or nonstandard condition arises in a sequence of code at run time this phenomenon is referred as Exception handling

An exception is a runtime error.

In Object Oriented, an exception is an object that is used to describes an exceptional condition that has occurred in a piece of code.

Open Cash Drawer(POS)

Submitted by emond on
Sample Script how to open a electronic Cash Drawer without any dll. Just connect through Epson TM series Receipt Printer. Great for developing Point of Sale. Hope ypu like it. For custom Softwares/ design Projects for Engineering Students Mobile +639155338048 Blog Site http://freeprogrammingtricks.blogspot.com//a> Facebook Fan Page http://www.facebook.com/emondsoft/ Skype

Skins and themes in ASP.NET

Submitted by planetsourcecode on
Sometimes we have to design those pages which have different color schemes but it is very difficult to maintain these types of pages. We can overcome from this situation by using skins and themes. This makes these things easier. 1). First create a Master Page having the following components. * One Content Placeholder 2).Create another page (default.aspx) and select the Master Page