Skip to main content

Posts

Showing posts from 2010

ASP.NET Dynamic Compilation

In ASP.NET Web Applications, When we request a page it must parse and compile the code of Web Application into one or more assemblies. When the code is compiled, it's translated into a language independent and CPU independent code, that's MSIL code. When we create an ASP.NET page, actually creating the source code for a .NET class. We are creating a new instance of the System.Web.UI.Page class.The entire contents of an ASP.NET page, including all script and HTML content, are compiled into a .NET class. When request an ASP.NET page, ASP.NET Framework checks for a .NET class that corresponds to that page. If a corresponding class does not exist, the Framework automatically compiles the page into a new class and stores the compiled class (the assembly) in the Temporary ASP.NET Files folder. The Temporary ASP.NET files folder located at : \WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files The next time anyone requests the same page in the future, the page is not co

Difference between VB and C#

Each one language has it's  excellency and assets. VB: VB.Net supporting Event Driven Language. VB.Net has WITH Construct, Which is not in C#. Vb.Net support for Optional Parameters. C#: C Sharp supporting Object Orientation. C Sharp is fully typed language than VB.Net. XML Documentation is generated from source code C Sharp supporting  Operator Overloading. C Sharp supporting this operator. C Sharp supporting Pointer via Unsafe Block. In Dot Net We can share the libraries of languages collaborately in our programming. Dot Net supporting CLR, which helping to use the libraries of all the languages supported by .Net. .Net supporting more than 50 languages. .Net is an Language Independent Development Environment. So that it helping to the developers, coders very effiently. Even the J# developers can use the .Net environment for their development purposes.

Difference between DataSet and DataReader

Data Reader i) Data Reader is readonly so we can't do any transaction on them. ii) Data Reader will be the best choice where we need to show the data to the user which requires no transaction. iii) Data Reader is like a forward only recordset. It fetches one row at a time so very less network cost compare to DataSet(Fethces all the rows at a time). As DataReader is forward only so we can't fetch data randomly. iv) .NET Data Providers optimizes the datareader to handle huge amount of data. DataSet i) DataSet is an in memory representation of a collection of Database objects including tables of a relational database schemas. ii) DataSet is always a bulky object that requires a lot of memory space compare to DataReader. iii) DataSet fetches all data from the datasource at a time to its memory area. So we can traverse through the object to get the required data like querying database. iv) DataSet can have relationship between the fetched tables. If you feel this tips help you th

Select N th Maximum - SQL Server 2005

To Select Nth Maximum Value using TOP key word, You can try the following Stored Procedure. CREATE PROCEDURE SP_SelectTopN (@N INT ) /****************************************/ /* Created By : Loganathan V */ /* Created On: 21-Sep-2010, Tuesday */ /* Purpose : To Get the N th Top Value from*/ /*                Recordset. */ /* How to : EXEC SP_SelectTopN */ /*             : EXEC SP_SelectTopN 4 */ /****************************************/ AS BEGIN         DECLARE @P INT         SELECT @P=@N         SELECT TOP 1 * FROM         ( SELECT TOP (@P) * FROM SALARYTABLE ORDER BY SALARY DESC )   AS  TOPNRECORDS ORDER BY SALARY ASC END To Run the Stored Procedure follow this:   EXEC SP_SelectTopN 4   To Select Nth Maximum Value without the use of TOP key word, You can try the following Stored Procedure. CREATE PROCEDURE USP_SELECT_TOP_NTH (@N INT = NULL ) AS /****************************************/ /* Created By : Loganathan V */ /* Created On: 21-Sep-2010, Tuesday */ /* Purpose

Multiplication Table in SQL Server

Multiplication Table in SQL Server This query gives the multiplication table from 1 to 10. DECLARE @A INT,                   @B INT,                   @C INT,                   @D VARCHAR (100)                   SELECT @A=1                  PRINT ' MULTIPLICATION TABLE 1-10' /****************************************/ /* Created By : Loganathan V */ /* Created On: 20-Sep-2010, Monday */ /* Purpose : Multiplication Table */ /* How to : RUN THE QUERY */ /****************************************/ WHILE (@A<=10) BEGIN            SELECT @B=1             SELECT @D=''            WHILE (@B<=10)              BEGIN               SELECT @C=1                SELECT @C=@A*@B               SELECT @D=+@D+ CAST (@C AS VARCHAR )+' '               SELECT @B=@B+1              END             PRINT @D+ CHAR (9)             SELECT @A=@A+1 END The output of this query will be like this. MULTIPLICATION TABLE 1-10  1    2   3   4  5   6   7  8   9   10  2    4   6  

CONSTRUCTORS IN C#

Constructors have the same name as the class, and usually initialize the data members of the new object. Constructors allow the programmer to set default values, limit instantiation, and write code that is flexible and easy to read. A constructor that takes no parameters is called a default constructor. Default constructors are invoked whenever an object is instantiated using the new operator and no arguments are provided to new. If a class is not defined with the constructor then the CLR (Common Language Runtime) will provide an implicit constructor which is called as Default Constructor. A class can have any number of constructors provided they vary with the number of arguments that are passed, which is they should have different signatures. Constructors do not return a value. Constructors can be overloaded. If a class is defined with static and Non-static constructors then the privilege will be given to the Non-static constructors. The following are the access modifiers for const

One or more ActiveX controls could not be displayed because..... in Outlook

Some times We've facing this problem in Microsoft Outlook. While trying to add the images to our mails or Opening some emails. 1) Your current security settings prohibit running ActiveX controls on this page, or 2) You have blocked a publisher of one of the controls As a result, the page may not display correctly. To resolve this problem follow these steps. In Microsoft Outlook : Go to Tools > Options > Mail Format > Message Format Check the options " Use MS Office Word to ....". Happy Mailing..........................