[X]

Asp.Net - Bindable image upload web user control with image preview

 

Developing Image upload web user control with image preview in asp.net:

As a developer working for content management system/ecommerce/blogging/social sites development, one most frequent task is image upload.

We spend lots of time dragging/dropping file control, upload button and writing code to check for file extension and then uploading the image on the site in specified directory location.

And if one wants to show the preview this task gets even much lengthier.

Keeping this in mind I wrote a web user control which is generic in nature and can be just used on any page with little configuration and offcourse no code rewriting.

Also this user control is bindable and has image preview if choosen. So this can be used inside data grid view/form view/list view/repeater/details view/data list control by just dragigng and dropping.

So lets start building image upload web user control with preview (optional):

1. Add a web user control to your website project.More...

Scrum Cheatsheet - Quick pocket reference

Agile development is now widely accepted and there are more companies and people who have started following this development methodology.

The most wisely used agile process is "Scrum". In scrum work is divided into short cycles called "Sprint". Typically the sprint duration is 2-4 weeks but it can be as short as one week and as long as one month.

The whole scrum is composed of 3 roles, 3 activities and 3 artifacts.

Given below is a scrum cheat sheet which consists of all major terms and short definitions. This sheet can be used as quick refresher or pocket reference.More...

C# - Swapping values of two variables without using third variable

 

 

Lots of guys are asked and have delved into solving a very common question - How do you swap values of two variables without using third variable?

Well there are more than one ways, we could achieve it.

So first let's start from school days.

1. using 3rd variable:

 

class Program
    {
        static void Main(string[] args)
        {
            SwappingUsingThirdVariable();
        }

        private static void SwappingUsingThirdVariable()
        {
            int num1=7, num2=9, num3=0;
            Console.WriteLine("Before swapping: num1={0}, num2={1}", num1, num2);
            num3 = num1; num1 = num2; num2 = num3;
            Console.WriteLine("After swapping: num1={0}, num2={1}", num1, num2);
            Console.ReadLine();
        }
    }

 

 


2. Witout using third variable and with help of plus/minus (+,-) operator: 

 

private static void SwappingUsingPlusMinusOperator()
        {
            int num1 = 7, num2 = 9;
            Console.WriteLine("Before swapping: 

num1={0}, num2={1}", num1, num2);
            if (num1 > num2)
            {
                num1 = num1 + num2;
                num2 = num1 - num2;
                num1 = num1 - num2;
                
            }
            else
            {
                num2 = num2 + num1;
                num1 = num2 - num1;
                num2 = num2 - num1;
                
            }
            Console.WriteLine("After swapping: 

num1={0}, num2={1}", num1, num2);
            Console.ReadLine();
        }

 

 

3. Witout using third variable and with help of mulitply/divide(*,/) operator:More...

Free SQL Server 2008 R2 Book download

SQL Server 2008 R2 - Free Book from Microsoft

If you are a sql server developer and wanted to have some free ebook on sql server 2008.

Here is the link I found while looking for the same. There is a free ebook download available on microsoft site for "SQL Server 2008 R2" edition.

This online book is the primary documentation for SQL Server.
Books Online includes the following types of information:
Setup and upgrade instructions.

Information about new features and backward compatibility.

Conceptual descriptions of the technologies and features in SQL Server.

Procedural topics describing how to use the various features in SQL Server.

Tutorials that guide you through common tasks.

More...

SQL Server Interview Questions And Answers

Preparing for SQL Server Interview

When  you go for an interview, have you ever wished that someone would just give you a list of questions so you knew what to study for? Well, now your wishes have come true with SQL Server Interview Questions and Answers.

SQL Server Interview Questions and Answers

The authors Pinal Dev and Vinod Kumar have already attended many interviews themselves so seem to know all the questions you should brush up on and how to really impress your future boss. More...

How to get the query running under a process in SQL Server

SQL Server Queries, Running under a process

Some time it requires to know what actually the SQL Server is executing under a process. So that we can know where exactly the procedure/query is stuck right now. Which helps us to know whether we can kill the running process or not. By making use of the inputbuffer it gives only the procedure (with parameteres) currently executed by the process, in the case of a procedure. Below query gives you the excat query executed by SQL Server.

More...

Posts By Month