how to do url rewrite in C#.net. implemented in asp.net4.0 version

how to do url rewrite in C#.net. implemented in asp.net4.0 version Url rewriting is just to display a friendly and readable url instead of a comlex or unfriendly url. Suppose there is a url in your website just like below: http://sharepointcafe.net/Page.aspx?userid=23456 The disadvantages of above mentioned url are: 1. This is not a friendly url.2. … Read more

Can we implement interface with same method name?

Interface is similar to a class, and we implement interface by defining their method in class. Suppose we have same method in more than one interface. In this case there will be a question for interview. Q.    Can we implement interface with same method name?Ans. Yes by using explicit interface implementation. Lets see below … Read more

Gridview row edit, delete and update code in asp.net

As Gridview is a data source control which binds data from backend sql server or any other database table. Here is the code which implements edit, delete and update functionality in a single Gridview. Gridview Edit,Update and Delete functionality code: ASPX Code: <asp:GridView ID=”gvDetails” DataKeyNames=”id” runat=”server” AutoGenerateColumns=”false”                  … Read more

Object initializers and Collection initializers in asp.net ?

Object initializer in asp.net, C#.net 4.0 features. Object initializers is one of the most important feature of C # 3.0.What is Object initializers?Using Object initializers we can initialize a object of that type without explicitly invoking the constructor of that particular type. Object initializers:I will explain this with a piece of code:class Student{    public … Read more

What is Nullable types in C#

What is nullable type in C# code? Please explain with an example. Nullable types were introduced in C# 2.0.Nullable types are instances of the System.Nullable<T> struct. A nullable type can represent the range of values for its underlying data type, also an additional null value. For example, a Nullable<Int32>, pronounced “Nullable of Int32,” can be … Read more

Dictionary in C sharp. Please explain with code

What is a dictionary in C#?Please explain. Below you can understand the use of the dictionary in an easy way. The Dictionary type in the C# language provides fast lookups with keys to get values.It allows you to use keys and values of any type, including ints and strings.using System;using System.Collections.Generic; class Program{    static … Read more

Concept of boxing and Unboxing in C sharp

Boxing and Unboxing concept in C# language. Explaining with code. Boxing: Boxing refers to the process of moving from a value type to reference type.Un-Boxing: Un-Boxing refers to the process of moving from a reference type to value type. Ex:Public void BoxingUnbox(){            int i = 10;          … Read more

RSS
YouTube
YouTube
Instagram