ASP.Net - Uploading Multiple Files Like Gmail / Orkut

C#/Asp.Net - Uploading multiple files like Gmail/Orkut

There are several ways of supporting multiple file upload in asp.net based on the requirements. Below are few ways that we can do coding to support multiple file uploads in asp.net:

1. If we fix number of files to be uploaded, we can place that many FileUpload control while designing the page.

2. But if we dont know how many files user will select like Gmail/Orkut, we can achieve this with JavaScript by creating controls on fly on the page and iterating through the HttpFileCollection class in asp.net/c#.

So lets see the complete code. Screenshots of the code:


T-SQL Check if String contains unicode character(s)

T-SQL - Checking for Unicode characters

Here is a code in T-SQL which will check if a string contains UNICODE characters:

Lets create a table variable:


declare @temp table (Name varchar(100), Address1 nvarchar(200))


Now we will insert two records, one of which contains ascii and one non-ascii character.



T-SQL Password Encryption / Decryption Using Password Phrase

T-SQL - Password Encryption/Decryption

Here is a sample code which will show how to encrypt/decrypt password using password phrase in T-SQL:

We will hard code password phrase and and original password then we will encrypt the password and store it in a variable.

Declare variables:


@passPhrase NVARCHAR(50),
@encryptedPass VARBINARY(MAX),
@decryptedPass NVARCHAR(50);




T-SQL Remove trailing zeros from left

T-SQL - Removing trailing zeroes

There are some cases when we have a value with trailing zeors to the left like '00089' but actually we want to consider only '89'.

The one solution to above problem is we can CAST it as INT. But since the value can be non-numeric also like '00089 MM:NN'. In this case CAST to INT will not work.

We will try to solve this problem using PATINDEX.

Below is the Code:


What Is an XML Web Service?

XML Web service

XML Web services are the fundamental building blocks in the move to distributed computing on the Internet. Open standards and the focus on communication and collaboration among people and applications have created an environment where XML Web services are becoming the platform for application integration. Applications are constructed using multiple XML Web services from various sources that work together regardless of where they reside or how they were implemented.

There are probably as many definitions of XML Web Service as there are companies building them, but almost all definitions have these things in common:

XML Web Services expose useful functionality to Web users through a standard Web protocol. In most cases, the protocol used is SOAP.

XML Web services provide a way to describe their interfaces in enough detail to allow a user to build a client application to talk to them. This description is usually provided in an XML document called a Web Services Description Language (WSDL) document.

XML Web services are registered so that potential users can find them easily. This is done with Universal Discovery Description and Integration (UDDI).


Cracking Technical Interview - Must Watch

Coding Interview - How to Crack

Going for technical interview, you must watch to know what can be asked and how should you answer/take over the interviewer. Watch this video and know what are the common mistakes that candidates can make in their technical interviews.


Posts By Month