Skip to main content


Showing posts from September, 2011

Binding a version in two version of same assembly in GAC.

You need to specify “bindingRedirect” in your config file. For instance in the below case “ClassLibraryVersion” has two versions “1.1.1830.10493” and “1.0.1830.10461” from which “1.1.1830.10493” is the recent version. However, using the bindingRedirect we can specify saying “1.0.1830.10461” is the new version. Therefore, the client will not use “1.1.1830.10493”

What is Boxing and Unboxing In .Net Framework

Boxing and unboxing act like bridges between value type and reference types. When we convert value type to a reference type it’s termed as boxing.
Unboxing is just vice-versa. When an object box is cast back to its original value type, the value is copied out of the box into the appropriate storage location.

What is ILDASM (Intermediate Language Disassembler) Tool In .Net Framework

Interview Questions:-
When it comes to understanding of internals, nothing can beat ILDASM. ILDASM converts the

What is a CLS (Common Language Specification) In .Net Framework

This is a subset of the CTS, which all .NET languages are expected to support. It was always a dream of Microsoft to unite all different languages in to one umbrella and CLS is one-step towards that. Microsoft has defined CLS, which are nothing but guidelines, that language should follow so that it can ommunicate with other .NET languages in a seamless manner.

CTS , CLS Explaition :
CTS is a base class library that contains all type information like Int32, Int64, String Boolean etc.  CLR understands only base type of library type not others type like CLR dont know what is int (C#) or Integer (VB)CLR only know Int32 type, So what about the CLS - CLS just a documentation that map base type into different - 2 language datatype, compiler reads and converts language datatype to documented base type (i.e CTS type) e.g compiler reads the associated base type of int(C# Integer in VB) is Int32 from CLS guidelines and convert it to Int32.

Exporting Pie Chart into excel file from csharp

This Article shows how to make a 3D Pie chart from a datatable into an Excel file , save this file and open the excel application through C#. It works with .Net Development Server  while it will not not work in application
hosted on IIS cause IIS does not allowed to start a process on server at all.

using Excel=Microsoft.Office.Interop.Excel;

Calling server function on fileupload text change in

How to Post a page to server on fieupload path change by client in Here is a code for doing postback when u click on browse button of a file upload and choose a file then Page posted to the server through linkbutton refrence and server involk the linkbutton_click event and you can upload your file at linkbutton click event.

//****************Code of .Aspx File************** <asp:FileUploadID="fu"onChange="FileUploadPostBack();"

Importing all sheet of excel 2003 .xls,2007 .xlsx file into dataset and bind it to gridview in c#

In this article you will see how to import all sheet from excel 2003 and 2007 file to c# dataset object and then you will display this data into girdview.

Method ImportExcelXLS given below takes two parameter first full path of .xls or .xlsx file and another bool type hasHeaders that is for including header of sheet or not, if you want to import data client file then you need to upload this file through fileupload and save this posted file to the server then pass this server full file path to this method and display data to girdview.

Uploading files to ftp server programmatically in

This code sample shows how to use using C# code to programmatically upload files to an ftp server,There is a lot of ways  to upload file to FTP Server here is the two of them first using with FtpWebRequest and another withWebClient.

Importing data from excel 2003 file in a gridview in c#

In this article you will see how to import given sheet from excel 2003 file into dataset and then display this data into girdview.
Below is the code for import data from given sheet named Sheet1$ into dataset then bind it to gridview, change sheet name as per your excel sheet name you have to ad suffix $ in sheet name.

Exporting gridview data into excel (.xls,.xlsx) file in c#

How to export table/gridview/datagrid to excel in :- To export a datagrid or a gridview data we have to get rendered html in server side for that we use 'RenderControl' property of controls which gives the render html in a HtmlTextWriter and then copyied in a StringWriter. For exporting a table add an attribute Runat='Server' in table MyTable = ID of Gridview/Datagrid/table (runat='server')

using System.Web.UI.HtmlControls;

show alert message from server side

If you want to show msg if you are posting the page to server through update panal (asynchronous postback) then you have to use this function.

//During Asynchronous Post Back in Update Panal Use ScriptManager (Inside Update Panal) public void alertBox(string Message)

Moving Image through javascript like flash file in

This article used for making slide show from JavaScript. Many time we need to do such task like moving images in html pages or an aspx page then we think about flash to do that task but it is must to install flash plugin in client browser,so we need an alternative solution of flash to move image just like flash, so here is the solution for making image slide solution through javascript, Just Add Your Image In Picture Array And Add Fuction to body onload.