Capchas in ASP.Net Web Form

The capchas are really very good thing to prevent bots from autofilling and securing our site.We can generate the capchas by our code but we can get some ready made capchas so there is no need to generate them and wasting time especially when they are very good.

ASP.NET Custom Error Pages

ASP.NET provides a simple yet powerful way to deal with errors that occur in your web applications. We will look at several ways to trap errors and display friendly meaningful messages to users. We will then take the discussion a step further and learn how to be instantly notified about problems so you can cope with them right away. As a geek touch we will also track the path 404's travel.

Working with Cookies in ASP.NET

ASP.NET has 3 classes which allow you to work with Cookies.

HttpCookie: provides a way to create and manipulate individual HTTP cookies.
HttpResponse: The Cookies property allows to create and save cookies on client machines.
HttpRequest: The Cookies property allows access to cookies from the client maintains.

Accessing form objects when there are multiple forms

In order to access a form through Javascript, we need to obtain a reference to the form object. One obvious way to approach, which you have already seen, is to use the getElementById method. For instance, if we had a form with the id attribute "subscribe_frm", we could access the form in this way:

What is a Virtual Directory and how to create it?


What is a virtual directory ?

A virtual directory represents a web application and it points to a physical folder in your computer.

A web application is accessed using a virtual directory name instead of a physical folder name. For example, if you have a web application called "Shopcart" in your machine, you will have a virtual directory for this web application. You will access your web application using the URL httP://localhost/Shopcart. If your virtaul directory name is "Test", then your web application url will be "http://localhost/Test".

Introduction to DataBinding in Silverlight

DataBinding is a link between a data source and a user interface. The data source provides data to the user interface. The data in the user interface may be changed by the user which will be updated to the source and could be saved back to the database.The data source could be business objects, collections, database tables or any other form of data that support data binding.

Static and Dynamic web pages

We can broadly classify web sites and web pages into two categories:

1. Static web pages
2. Dynamic web pages

How to pass parameters to Silverlight controls from ASP.NET pages ?

You can pass parameters from your aspx pages and html pages to the Silverlight controls. This chapter explains how to pass parameters to Silverlight controls from your aspx page and code behind files.

Open a specific xaml page from a Silverlight control

Each Silverlight application project may include multiple xaml pages. When you refer to a .xap file from a web page, the xaml page set using the Application.RootVisual property will be displayed by default.

Lazy Initializer to defer expensive Object creation

.NET 2010 comes with lots of new features. Some relates to Technology while other relates to language enhancements. The huge class library that is there with .NET framework is also enriched with new classes. In .NET 4.0 there is a new set of classes which introduces a new concept called Lazy initializes. Here is a discussion how simply you can use Lazy initialize to defer the execution of a method or property for values to whenever it is required.

Operator Overloading with Implicit and Explicit Casts in C#

Its been a very common mistake of not declaring implicit and explicit cast operator overloads while working with data types which might take part in some calculations in long run. Many of the developers don't know why we use checked or unchecked while doing calculations. This post is an article on how you can use Cast overloads to get your job done easily when you require your type to take part in arithmetic operations and casts to arithmetic data types.

Notion of System.Nullable - A Look

C# has lots of flexibilities and hooks to turn around things that was impossible for other languages. One of such thing is the introduction of Nullable Types. Here is a discussion of how you could use Nullable to make sure your code works well for null values in Value Types.

Garbage Collection Notifications in .NET 4.0

Memory management is primary for any application. From the very beginning, we have used destructors,  or deleted the allocated memory whilst using the other programming languages like C or C++.  C# on the other hand being a proprietor of .NET framework provides us a new feature so that the programmer does  not have to bother about the memory deallocation and the framework does it automatically.

How to create a WCF service without Visual Studio

WCF is the first step in building a truly service oriented application for you. It is the most important when working with distributed architecture.Visual Studio is capable of creating its own configuration settings that helps in developing our application with ease. But what if you don’t have Visual Studio? Here is the details to implement one of the most basic WCF service without using Visual Studio and how to interact with the service. Lets do it step by step:

Partial Methods

Partial classes allows you to divide your own class in one or more files but during runtime the files would be merged to produce a single coherent object. By this way the classes could be made very small and also easily maintainable.

.NET Community Session : ASP.NET 4.0 In - Depth

ASP.NET 4.0 comes with lots of new features that enhance the developers to deal with ASP.NET applications easily and also core functionality to deal with both server side and client side of an ASP.NET application. These changes makes ASP.NET 4.0 applications more effective than the existing ASP.NET applications.