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”
There a lot of confusion that what is the difference between convert.toString and .toString my friend always asked me about that just to give an understanding of what the above question means see the below code.
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 the difference between namespace and assembly is the most frequently asked question in the interview and its very easy to understand the differnce,Following are the differences between namespace and assembly:
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.
In this article you will see how to import all sheet from excel 2003 and 2007 file to asp.net 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.
This code sample shows how to use Asp.net 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.
How to export table/gridview/datagrid to excel in asp.net :-
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')