Please enable Javascript to correctly display the contents on Dot Net Tricks!

Dot Net Tricks Tutorial - For Beginners & Professionals

.net article,c# tutorial,asp.net tutorial,linq tutorial,wcf tutorial,mvc tutorial,entity framework tutorial,sqlserver tutorial,jquery tutorial,visual studio tutorial
 
Author : Shailendra Chauhan
Posted On : 18 Jul 2012

File uploading functionality is generally used by the developers. Before uploading file on the server, to know the size of file is a good practice. By knowing file size, we can restrict the end user to upload large size files on the server since we have limited space on the server. We should check uploaded file size on server side as well client side.

 

 

Author : Shailendra Chauhan
Posted On : 21 Jul 2012

Sometimes, we required to display form fields in non-editable mode. We can achieve this functionality by setting read-only or disabled attribute to form fields (textbox, label, checkbox, text area). Before using both these attributes, we should understand the key differences between read only and disabled attributes.

 

 

Author : Shailendra Chauhan
Posted On : 06 Jul 2012

When we want to deploy our web application to live/local server, then we have two options for making built – Release mode and Debug mode. Both the modes have own importance and characteristics. The details about Release mode and Debug mode are as:

 

 

Author : Shailendra Chauhan
Posted On : 04 Jul 2012

We can validate email address at client side and server side. To validate email address on client side, we can use java script with regular expression. Java script can check the regular expression pattern for valid email address. We have different regular expression patterns for validating email address.

 

 

Author : Shailendra Chauhan
Posted On : 20 Jun 2012

In .net 3.5 some new generic delegates -Func<T>, Action<T> and Predicate<T> were introduced. Using generic delegates, it is possible to concise delegate type means you don’t have to define the delegate statement. These delegates are the Func<T>, Action<T> and Predicate<T> delegates and defined in the System namespace.

 

 

Author : Shailendra Chauhan
Posted On : 20 Jun 2012

Delegate is a reference type that holds the reference of a class method. Any method which has the same signature as delegate can be assigned to delegate. Delegate is like function pointer in C++. There are three aspects to a delegate: Declaration, Instantiation and Invocation.

 

 

Author : Shailendra Chauhan
Posted On : 19 Jun 2012

An extension method is a static method of a static class that can be invoked using the instance method syntax. Extension methods are used to add new behaviors to an existing type without altering. In extension method "this" keyword is used with the first parameter and the type of the first parameter will be the type that is extended by extension method.

 

 

Author : Shailendra Chauhan
Posted On : 19 Jun 2012

Sometimes we need to add scroll bar to a div or span whenever text in the div or span get overflow. scroll bar is supported in all browsers like IE 5+, FF 3.5+, and Safari, Opera etc. To show scroll bar, we need to specify overflow property of css to "visible" or "auto".

 

 

Author : Shailendra Chauhan
Posted On : 23 May 2012

Sometimes we need to wrap a long text and url forcefully. Without word wrap our design layout become awkward. So to do proper alignment of text, we need to wrap text. We can force a long or continuous text to wrap in a new line by defining css word-wrap property to break-word. Word-wrap is supported in all browsers like IE 5+, FF 3.5+, and Safari, Opera etc.

 

 

Author : Shailendra Chauhan
Posted On : 18 Jun 2012

The concept of lamda expression was introduced in C# 3.0. Basically, Lamda expression is a more concise syntax of anonymous method. It is just a new way to write anonymous methods. At compile time all the lamda expressions are converted into anonymous methods according to lamda expression conversion rules.

 

 

Author : Shailendra Chauhan
Posted On : 18 Jun 2012

The concept of anonymous method was introduced in C# 2.0. An anonymous method is inline unnamed method in the code. It is created using the delegate keyword and doesn’t required name and return type. Hence we can say, an anonymous method has only body without name, optional parameters and return type.

 

 

Author : Shailendra Chauhan
Posted On : 17 Jun 2012

Object oriented and Object based programming languages have some different features and behaviour. In this article, I am going to expose the main difference between these two programming languages.

 

 

Author : Shailendra Chauhan
Posted On : 17 Jun 2012

In programming langauages we have two concepts functions and methods. functions are defined in structural language and methods are defined in object oriented langauge. The difference between both is given below :

 

 

Author : Shailendra Chauhan
Posted On : 17 Jun 2012

In Asp.net, sometimes we need to validate a TextBox and its input by more than one validator controls. Suppose you Want to validate a TextBox that must contain a valid Email address then we required two validator controls - Required Field and Regular Expression as shown below:

 

 

Author : Shailendra Chauhan
Posted On : 06 Apr 2012

var data type was introduced in C# 3.0. var is used to declare implicitly typed local variable means it tells the compiler to figure out the type of the variable at compilation time. A var variable must be initialized at the time of declaration.

 

 

 
 
SUBSCRIBE TO OUR YOUTUBE CHANNEL
 
 
 
LIKE US ON FACEBOOK
 
+