You are on page 1of 65

ASP.

NET Difference FAQs


1. What are the differences between Inline code and Code Behind Code? S.No 1 2 Inline code Its within .aspx file Dynamically compiled Code Behind Code Its in a external class file Compiled prior to deployment and linked with .aspx file

2. What are the differences between Global.asax and Web.Config? S.No 1 2 3 4 global.asax It is a class file There can be only one for an application Can have Application and Session events Need to be recompiled when changes are made web.config It is an XML file There can be many if under different sub-folders Cannot have Application and Session events No need to compile when changes are made

3. What are the Differences between Server.Transfer and Response.Redirect? S.No 1 Server.Transfer The navigation happens on the server-side ,so client history is not updated Data can be persist across the pages using Context.Item collection No Round-trips Has Good encapsulation Response.Redirect The navigation happens on the client-side ,so client history is updated Context.Items loses the persistence

3 4

Makes a Round-trip No

4. What is the difference between a custom control and a user control? S.No 1 2 3 User Control Is a file with the .ascx extension Can be only used with the application Language dependent Custom Control Is a file with the .dll extension Can be used in any number of applications They are language independent, a control created in c# can be used in vb.net Can be added to Visual studio Toolbox

Cannot be added to Visual studio

Toolbox 5 Inherits from Server controls and easy to create Generally used for static content We have to develop from scratch , so comparatively difficult Used when dynamic content is required Application Application does not have expire policy Application require explicit locking Application variables exist as long as the application is alive

5. What is the difference between Caching and Application? S.No 1 2 3 Caching Cache have expire policy Cache does not require explicit locking Cache has the Property of timeout, which allows us to control the duration of the Objects so cached Output can be cached in 4 ways, 5 Page Output Caching Page Partial Caching DataSource Caching Data Caching It is accessible to both page level and application level to all the users

Application does not have options as like Cache object

It is accessible to page level to all the users

6. What is the difference between web farm and web garden? S.No 1 Web farm A web application running on multiple servers is called a web farm. Web garden A web application running on a single server that has multiple CPUs is called a web garden.The benefit of using this is, if one server crashes then other will work instantly. Web Farm is implemented using techniques like Net Work Load Balancing.

For Web Garden, we have to use in Machine.Config file.

Summary: Web garden and web farms are asp.net applications that serve the purpose when the user base of a web site increases considerably. For Web garden/Web Farm configurations, we have to set sessionState mode to

StateServer/SQLServer in the web.config file. 7. What is the difference between Application and Session Events? S.No 1 Application Event Application events are used to initialize objects and data that we do want to make available to all the current sessions of our web application Session Event Session events are used to initialize data that we want to keep throughout individual sessions, but that we do not want to share between sessions

8. What is the difference between Session Cookies and Persistent Cookies? S.No 1 Session Cookies Session Cookies do not have expiration date Persistent Cookies Persistent Cookies have an expiration date. The expiration date indicates to the browser that it should write the cookie to the clients hard drive HTML Controls HTML Controls can trigger only page-level events on server (postback) Data is not maintained in an HTML control. Data must be saved and restored using page-level scripts HTML controls have HTML attributes only

9. What are the differences between Server Controls and HTML Controls? S.No 1 Server Controls Server Controls can trigger control-specific events on the server Data entered in a server control is maintained across requests. Server controls retain state The Microsoft .NET Framework provides a set of properties for each server control. Properties allows us to change the server controls appearance and behavior within server-side code Server controls automatically detect browser and adapt display as appropriate

We must detect browser in code or write for least common denominator

10.What are the differences between ViewState and Hidden fields? S.No 1 2 3 ViewState This is used for pages that will postback to itself This is built in structure for maintaining state of a page Security is more as data is hashed, compressed and Hidden fields This is used for pages that will postback to itself or to another page This is not an inbuilt structure Security is less when compared to ViewState

encoded 11.What is the difference between SQL Cache Notification and SQL Cache Invalidation? S.No 1 SQL Cache Notification Using SQL Cache Notification, we can generate notifications when the data of a database on which a cached item depends changes SQL Cache Invalidation Using SQL Cache Invalidation, we can make a cached item invalid that depends on the data stored in a SQL server database, when the data in the SQL server database is changed

12.What is the difference between absolute time expiration and sliding time expiration? S.No 1 Absolute time expiration In absolute time expiration, a cached item expires after the expiration time specifies for it, irrespective of how often it is accessed Sliding time expiration In sliding time expiration, the time for which the item is cached is each time incremented by its expiration time if it is accessed before completion of its expiration time

13.What is the difference between adding items into cache through Add() method and Insert() method? S.No 1 Cache.Add() Cache.Add() method also returns an object representing the item we have added in the cache ,besides adding the item in the cache It is not possible to replace an existing item in the cache using the Cache.Add() method Cache.Insert() Cache.Insert() method adds only the item in the cache

We can replace an existing item in the cache using the Cache.Insert() method

14.What is the difference between page-level caching and fragment caching? S.No 1 Page-level caching In Page-level caching, we cache a whole page Fragment caching In Fragment caching, we cache parts of the web page such as a user control added to the web page

15.What is the difference between Label control and Literal control? S.No 1 Label control Final HTML code of a Label control has an HTML tag Literal control Final HTML code of a Literal control contains only text, which is not surrounded by any HTML tag

16.What is the difference between HyperLink control and LinkButton control?

S.No 1

HyperLink control A HyperLink control do not have Click and Command events

LinkButton control A LinkButton control have Click and Command events, which can be handled in the code behind file of the web page

17.What is the difference between an HtmlInputCheckBox control and an HtmlInputRadioButton control? S.No 1 HtmlInputCheckBox control We can select more than one HtmlInputCheckBox control from a group of HtmlInputCheckBox controls HtmlInputRadioButton control We can select only a single HtmlInputRadioButton control from a group of HtmlInputRadioButton controls

18.How a content page differs from a master page? S.No 1 Content page A content page does not have complete HTML source code Master page A master page has complete HTML source code inside its source file

19.How will you differentiate a submaster page from a top-level master page? S.No 1 Submaster page Like a content page, a submaster page also does not have complete HTML source code Top-level master page Top-level master page has complete HTML source code inside its source file

20.What is the difference between a page theme control and a global theme? S.No 1 Page theme A page theme is stored inside a subfolder of the App_Themes folder of a web application It can be applied to individual web pages of the web application Global theme A global theme is stored inside the Themes folder on a web server It can be applied to all the web sites on the web server

21.What is the difference between a default skin and a named skin? S.No 1 2 Default skin A default skin does not have a SkinId attribute It is automatically applied to all the controls of the same type present on a web page Named skin A named skin has a SkinId attribute It is applied to a control explicitly by setting the SkinId property of the control from the Properties window

22.Differentiate Globalization and Localization S.No Globalization Localization

Globalization is the process of identifying the specific portion of a web application that needs to be different for different languages and isolating that portion from the core of the web application example: a)consider this tag in Web.Config file. It would cause the dates to be displayed in French for the web page of the folder where this Web.Config file is located. b) CultureInfo d=new CultureInfo("de-DE"); Response.Write(DateTime.Now.T oString("D",d); It would display date in long format using German culture

Localization is the process of configuring a web application to be supported for a specific language or locale

example: we have 2 resource files: a)default.aspx.fr-FR.resx b)default.aspx.en-US.resx Using appropriate coding in the .aspx.cs files of a web page, the strings written in these resource files can be used to change the text of the strings dynamically.

23.What are the differences between web.config and machine.config? S.No 1 web.config This is automatically created when we create an ASP.Net web application project This is also called application level configuration file We can have more than one web.config file This file inherits setting from the machine.config machine.config This is automatically installed when we install Visual Studio. Net This is also called machine level configuration file Only one machine.config file exists on a server This file is at the highest level in the configuration hierarchy

2 3 4

Reference: http://onlydifferencefaqs.blogspot.in/2012/07/aspnet-difference-faqsdoc.html

ASP.NET Difference FAQs-2


Difference between Web site and Web application S.No 1 Web site Can mix vb and c# page in single website. Web application We can't include c# and vb page in single web application.

2 3 4

Can not establish dependencies. Edit individual files after deployment. Right choice when one developer will responsible for creating and managing entire website. i.e.,In web site development, decoupling is not possible.

We can set up dependencies between multiple projects. Can not edit individual files after deployment without recompiling. Right choice for enterprise environments where multiple developers work unitedly for creating,testing and deployment. i.e.,In Web application, different different groups work on various components independently like one group work on domain layer, other work on UI layer. Web application is more difficult to create than a Web site

Web site is easier to create than Web application

Difference between Local storage and cookies S.No 1 2 3 Local storage Good to store large amount of data, up to 4MB Easy to work with the JavaScript Local storage data is not sent to the server on every request (HTTP header) as it is purely at the client side No way to specify the time out period as the Cookies have Cookies Good for small amount of data, up to 4KB Difficult to work with JavaScript All data is transferred to and from server, so bandwidth is consumed on every request Can specify timeout period so that cookies data are removed from browser

Difference between Session and Cache S.No Session 1 2 Ssession retains state per user Cache Cache is used for retaining state for application scoped items.

Items put into a session Items in the cache can expire (will will stay there, until the be removed from cache) after a session ends specified amount of time. And also there is no guaranty that objects will not be removed before their expiration times as ASP.NET remove

items from cache when the amount of available memory gets small. This process is called as Scavenging. 3 The session state can This is not the case with the cache. be kept external (state server, SQL server) and shared between several instances of our web app (for load balancing).

Difference between Datalist and Repeater S.No Datalist 1 Repeater

Datalist supports multiple Repeater doesn't support multiple columns displaying and columns display,no repeat columns using repeat columns property property Datalist supports styles for formating templates data[headerstyle,...] Datalist rendering output[html content]will be slow compare with repeater. Repeater does not provide styles

Repeater performanace is better than Datalist

Summary: If the requirement can achieve using repeater and datalist,choose repeater for better performance Reference: http://onlydifferencefaqs.blogspot.in/2012/07/aspnet-difference-faqs-2.html

ASP.Net Difference FAQs-3


1.Difference between ASP.NET and PHP S.No 1 ASP.NET Technology Availability: ASP.NET was launched by Microsoft in the year 2002. 2 Database: ASP.Net uses MS-SQL for PHP Technology Availability: PHP was launched by Rasmus Lerdorf in the year 1995. Database: For point of database connectivity

connecting database but MSSQL can not be availed free from Microsoft.

PHP uses MySQL for the purpose of database connectivitybecasue its highly flexiblilty nature. Another important fact is that it will incurextra expenditure because MySQL can be accessed for free. Cost: Linux can be used for running PHP programs and Linux is free operating system. Therefore,the cost of developing a website in PHP language is remarkably low

Cost: We need to install Internet Information Server (IIS)on a Windows server platformif you want to run ASP.Net program. As Windows server platform is not a free product,the cost of production is bounded to be increased. Run Time : It has been observed that ASP.Net code runs slower than PHP code. This is because ASP.Net utilizes server space while running

Run Time: Whereas inbuilt memory space is used by PHP while running.

Coding Simplicity: ASP.Net codes are somewhat complicated and a web developer needs to work hard to get the hang of it

Coding Simplicity: PHP codes are very simple and a programmer does not have to make a diligent effort because it is comparatively easier than other types of programming languages. Platform Connectivity Issue: PHP has a unique advantage in this issue. Its codes can be linked with different types of platforms such as Windows, Linux and UNIX.

Platform Connectivity Issue : ASP.NET codes are usually run on Windows platforms but if you install ASP-Apache in the server than it can run on Linux platform as well.

Cost of Tools : There is no such free tools are available for ASP.Net.

Cost of Tools : PHP codes are available for free in various forums and blogs as it is a open source software. Furthermore, some useful tools that can be used in PHP are also available for free Language Support : The codes that are used in PHP

The syntax of ASP.Net is more or less similar to that of Visual basic syntax and this is all but

simple.

are very much similar to that of C+ + language and its syntax resembles the syntax used in C and C++. Therefore, if you have a fair knowledge in C++ or C, you will not face any difficulty while coding PHP language. Security : Though PHP can offer enough measures for ensuring data security

Security : ASP. Net is reputed for creating sophisticated techniques to ensure the safety of confidential data.This is the reason why government organizations opt for ASP.Net.

2.Difference between ASP and ASP.NET S.No 1 2 ASP ASP is a request response model. ASP code is an interpreted language that is interpreted by the script engine. HTML and the coding logic are mixed in ASP. To develop and debug ASP application, there are very limited tools. ASP has limited support to Object Oriented Programming principles. Session management and application state management is very limited in ASP. Error handling system is poor in ASP. ASP does not offer any in-built support for the XML. ASP.NET ASP.NET is a programming model that is event driven. ASP.NET is a compiled CLR code that will be executed on the Server. The code and design logic is separated in ASP.NET. ASP.NET application can be developed and debugged using various tools including the leading Visual Studio .NET tool. ASP.NET is a complete Object Oriented Programming language. ASP.NET extends complete support for session management and application state management. ASP.NET offers complete error handling and exception handling services. In ASP.NET, data exchange is easily performed using XML support.

3 4

Data source support is not fully distributed in ASP.

Data source support is fully distributed in ASP.NET.

3.Difference between ASP.NET and VB.NET S.No 1 ASP.NET ASP.NET is web technology that is used in building web applications and websites. ASP.NET is a server side technology that is language independent. Any .NET languages such as C#, VB.NET can be used to develop web applications through ASP.NET. ASP.NET is included within the .NET framework. For example, ASP.NET contains the text boxes and the controls that can be dragged and dropped into a web form. 4 5 ASP.NET contains server controls. ASP.NET can support all .NET languages. VB.NET VB.NET is a language that is used in writing programs that are utilizing the ASP.NET framework. VB.NET is a .NET programming language. VB.NET is used to create ASP.NET web applications or windows applications using Visual Studio Windows Forms Designer or mobile applications or console applications or applications for variety of other purposes. VB.NET is not part of .NET framework. For example, VB.NET is the code that is written on various events of text boxes and controls to make them function as per the requirement. VB.NET does not include server controls. VB.NET can support only scripting languages.

4.Difference between Java and .NET S.No 1 2 Java JAVA is developed by Sun Microsystem JAVA is a programming language In JAVA, JVM(Java Virtual Machine) execute the code and convert source code to byte code. .NET .NET is developed by Microsoft. .NET is a framework that supports many programming languages like C#,ASP,VB. In .NET CLR(common language Runtime) execute the code with two phase compilation.

4 5

JAVA can run on any operating system But in JAVA it depends upon the programmer to destroy the garbage memory.

.NET can run only on windows/IIS. Although .NET support both explicit and implicit garbage collection,especially,in .NET the garbage collector destroy the garbage value in an efficient manner as compared to JAVA. ADO .NET is use for database connection in .NET. .net has a standard development IDE i.e. Microsoft Visual Studio Both windows and web applications can developed by .net but it will be more better to go for windows application with .NET . you can also go for web application with .NET but it will only hosted on windows server.

6 7 8

JDBC is used for database connection in JAVA For java many third party IDEs are available. But web application in java run on any operating system.

9 10

Exception Handling in Java is Exception Handling in .NET is harder than .NET simpler than JAVA. JAVA uses bootclasspath for completely trusted codes. Java is less secure than .NET while providing security .NET uses GAC(Global Assembly Cache) and keep trusted assemblies. JAVA and .NET both have similar security goals. But .NET is more secure because of its simple and clean designs. .Net due to disconnected data access through ADO.Net has high level of performance against Java JDBC Due to Microsoft Visual Studio, development is faster. Microsoft Visual Studio installation requires higher configuration system. .Net is the platform itself for a multitude of languages. One can use C, C++ and VB to program upon .net. These programs interact

11

12

Java JDBC which requires multiple round trips to data base. Hence, performance is lesser than .NET Development is comparatively slower. Java applications development can be done on even less configuration computer system. Java can only communicate with java programs

13 14

15

with each other using common methods. these common methods are defined by .Net, and are used by the programs to communicate with each other without worry about that language the program was written in. the machine running the program/s will need the .Net platform to be installed.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/aspnet-difference-faqs-3.html

ASP.NET Difference FAQs-4


1.Difference between HTTP and HTTPS S.No 1 2 3 4 5 6 7 HTTP URL begins with http://" in case of HTTP HTTP is unsecured HTTP uses port 80 for communication HTTP operates at Application Layer No encryption is there in HTTP No certificates required in HTTP Most internet forums will probably fall into this category. Because these are open discussion forums, secured access is generally not required HTTPS URL begins with https:// in case of HTTPS. HTTPS is secured. HTTPS uses port 443 for communication. HTTPS operates at Transport Layer. HTTPS uses encryption. certificates required in HTTPS. HTTPS should be used in Banking Websites, Payment Gateway, Shopping Websites, Login Pages, Emails (Gmail offers HTTPS by default in Chrome browser) and Corporate Sector Websites. For example: PayPal: https://www.paypal.com Google AdSense: https://www.google.com/adsense/

2.Difference between GET and POST methods S.No 1 GET Post Mechanism: GET request is sent via URL. POST Post Mechanism: Post request is sent via HTTP request body or we can say internally. Form Default Method: We have to specify POST method within form tag like Security: Since Post request encapsulated name pair values in HTTP request body, so that we can submit sensitive data through POST method. Length: POST request has no major limitation.

Form Default Method: GET request is the default method.

Security: Since GET request is sent via URL, so that we can not use this method for sensitive data.

Length: GET request has a limitation on its length. The good practice is never allow more than 255 characters.

Caching or Bookmarking: GET request will be better for caching and bookmarking.

Caching or Bookmarking: POST request is not better for caching and bookmarking. SEO: POST request is not SEO friendly. Data Type: POST request has no restriction. Best Example: LOGIN is the best example for POST request.

SEO: GET request is SEO friendly.

Data Type: GET request always submits data as TEXT.

Best Example: SEARCH is the best example for GET request.

HTTP Request Message Format: 1 GET /path/file.html? SearchText=Interview_Questio n HTTP/1.0 2 From: umarali1981@gmail.com 3 User-Agent: HTTPTool/1.0 4 [blank line here]

HTTP Request Message Format: 1 POST /path/script.cgi HTTP/1.0 2 From: umarali1981@gmail.com 3 User-Agent: HTTPTool/1.0 4 Content-Type: application/xwww-form-urlencoded 5 Content-Length: 8 6 7 Code=132

Some comments on the limit on QueryString / GET / URL parameters Length: 1. 255 bytes length is fine, because some older browser may not support more than that. 2. Opera supports ~4050 characters. 3. IE 4.0+ supports exactly 2083 characters. 4. Netscape 3 -> 4.78 support up to 8192 characters. 5. There is no limit on the number of parameters on a URL, but only on the length. 6. The number of characters will be significantly reduced if we have special characters like spaces that need to be URLEncoded (e.g. converted to the '%20'). 7. If we are closer to the length limit better use POST method instead of GET method. 3.Difference between User Controls and Master Pages S.No 1 2 3 4 User Controls Its extension is .ascx. Code file: .ascx.cs or .ascx.vb A page can have more than one User Controls. It does not contain Contentplaceholder and this makes it somewhat difficult in providing proper layout and alignment for large designs. Suitable for small designs(Ex: logout button on every .aspx page.) Register Tag is added when we drag and drop a user control onto the .aspx page. Can be attached dynamically using LoadControl method.PreInit event is not Master Pages Its extension is .Master. code file: .master.cs or .master.vb extension Only one master page can be assigned to a web page It contains ContentPlaceHolder.

More suitable for large designs(ex: defining the complete layout of .aspx page) MasterPageFile attribute is added in the Page directive of the .aspx page when a Master Page is referenced in .aspx page. Can be referenced using Web.Config file also or dynamically by writing code in PreInit event.

mandatory in their case for dynamic attachment.

4.Difference between Build and Rebuild S.No 1 Build A build compiles only the files and projects that have changed. Build does not updates the xml-documentation files Rebuild A rebuild rebuilds all projects and files in the solution irrelevant of whether they have changed or not. Rebuild updates the xmldocumentation files

Note: Sometimes,rebuild is necessary to make the build successful. Because, Rebuild cleans Solution to delete any intermediate and output files, leaving only the project and component files, from which new instances of the intermediate and output files can then be built. 5.Difference between generic handler and http handler S.No 1 Generic Handler Generic handler has a handler which can be accessed by url with .ashx extension Typical example of generic handler are creating thumbnails of images Http Handler http handler is required to be configured in web.config against extension in web.config.It does not have any extension For http handler, page handler which serves .aspx extension request and give response.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/aspnet-difference-faqs-4.html

ASP.Net Difference FAQs-5


1.Difference between ViewState and SessionState S.No 1 2 ViewState View state is maintained in page level only. View state of one page is not visible in another page.i.e., SessionState Session state is maintained in session level. Session state value is available in all pages within a user session.i.e.,

when user requests another page previous page data will be no longer available. 3 4 View state information stored in client only. View state persist the values of particular page in the client (browser) when post back operation done. View state used to persist page-instance-specific data.

The data will be no longer available if user close the browser or session timeout occurs. Session state information stored in server. Session state persist the data of particular user in the server. This data available till user close the browser or session time completes. Session state used to persist the user-specific data on the server side.

2.Difference between ViewState and ControlState S.No 1 2 ViewState ViewState can be disabled ViewState is implemented by using EnableViewState property of a control to true. ControlState Control State cannot be disabled. Control State works even when EnableViewState is off. To use Control State (for example in a custom control) we have to override OnInit method,call RegisterRequiresControlState method in OnInit method and then override the SaveControlState and LoadControlState methods. Control State is used for small data only. eg: maintain clicked page number in a GridView even when EnableViewState is off

ViewState is used to maintain page-level state for large data

3.Difference between SessionState and Cookies S.No 1 SessionState Session can store any type of data because the value is of datatype of "object" These are stored at Server side Session are secured because Cookies Cookies can store only "string" datatype They are stored at Client side Cookie is non-secure since stored

2 3

it is stored in binary format/encrypted form and it gets decrypted at server 4 Session is independent for every client i.e individual for every client

in text format at client side

Cookies may or may not be individual for every client

There is no limitation on size or Due to cookies network traffic will number of sessions to be used increase.Size of cookie is limited to in an application 40 and number of cookies to be used is restricted to 20. For all conditions/situations we can use sessions We cannot disable the sessions.Sessions can be used without cookies also(by disabling cookies) The disadvantage of session is that it is a burden/overhead on server Sessions are called as NonPersistent cookies because its life time can be set manually Only in few situations we can use cookies because of no security We can disable cookies

6 7

Since the value is string there is no security We have persistent and nonpersistent cookies

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/aspnet-difference-faqs-5.html

ASP.NET Difference FAQs-6


1.Difference between DataGrid and GridView S.No 1 DataGrid Sorting: In DataGrid code requires to handle the SortCommand event and rebind grid required. Paging: In DataGrid requires code to handle the PageIndexChanged event and rebind grid required. Data binding: Like GridView DataGrid cannot bind with new datasource control in ASP.NET 2.0. GridView Sorting: In case of GridView no additional code required.

Paging: In case of GridView no additional code required. It also supports customized appearance. Data binding: GridView can bind with new datasource control

Updating data: DataGrid requires extensive code to update operation on data Events: In DataGrid less events supported as compared to GridView.

Updating data: GridView requires little code. Code like exceptions handling for database part. Events: GridView supports events fired before and after database updates.

2.Difference between ListView and GridView S.No 1 ListView Data Grouping: In-built support for this functionality is provided. Provide Flexible Layout: Inbuilt support for this functionality is provided. Insert: In-built support for this functionality is provided. GridView Data Grouping: To provide this functionality, we need to write custom code. Provide Flexible Layout: To provide this functionality, we need to write custom code Insert: To provide this functionality, we need to write custom code

3.Difference between DataList and GridView S.No 1 DataList Paging: To provide this functionality, we need to write custom code. Provide Flexible Layout: Inbuilt support for this functionality is provided. Update,Delete: To provide this functionality, we need to write custom code Data Grouping: In-built support for this functionality is provided. Sorting:To provide this functionality, we need to write GridView Paging: In-built support for this functionality is provided. Provide Flexible Layout: To provide this functionality, we need to write custom code Update,Delete: In-built support for this functionality is provided. Data Grouping: To provide this functionality, we need to write custom code. Sorting:In-built support for this functionality is provided.

custom code. 4.Difference between Repeater and ListView S.No 1 Repeater Paging: To provide this functionality, we need to write custom code. Data Grouping: To provide this functionality, we need to write custom code. Insert: To provide this functionality, we need to write custom code Update,Delete: To provide this functionality, we need to write custom code Sorting:To provide this functionality, we need to write custom code. ListView Paging: In-built support for this functionality is provided. Data Grouping: In-built support for this functionality is provided. Insert: In-built support for this functionality is provided. Update,Delete: In-built support for this functionality is provided. Sorting:In-built support for this functionality is provided.

5.Difference between Repeater and DataList S.No 1 2 Repeater Repeater is template driven Repeater cannot automatically generates columns from the data source Row selection is not supported by Repeater Editing of contents is not supported by Repeater Arranging data items horizontally or vertically is not supported by Repeater DataList DataList is rendered as Table. DataList can automatically generates columns from the data source Row selection is supported by DataList Editing of contents is supported by DataList We can arrange data items horizontally or vertically in DataList

3 4 5

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/aspnet-difference-faqs-6.html

ASP.NET Difference FAQs-7


1.Difference between trace and debug in .NET S.No 1 Trace Debug

This class works only when This class works only when your your application build defines application build defines the the symbol TRACE. symbol DEBUG. For tracing, you have to use For tracing, you have to use Trace.WriteLine statements. Debug.WriteLine statements. Trace class is generally used You generally use debug classes at to trace the execution during the time of development of deployment of the application. application. Trace class works in both Debug class works only in debug debug mode as well as release mode. mode. Performance analysis can be Performance analysis cannot be done using Trace class. done using Debug class. Trace runs in a thread that is Debug runs in the same thread in different from the Main Thread. which your code executes. Trace is used during Testing Debug is used during Debugging Phase and Optimization Phase Phase of different releases.

2 3

5 6 7

2.Difference between ASP and ASPX S.No 1 2 3 ASP ASPX

The .asp is the file extension of The .aspx is the file extension of the classic ASP page. ASP.NET page. ASP stands for Active Server ASPX is the acronym of Active Pages. Server Pages Extended. The .asp file runs under the The .aspx file runs in a separate process space of inetinfo.exe, worker process called as which is an IIS process space. aspnet_wp.exe. The .asp file can execute only in platforms of Microsoft technology. It cannot run in non-Microsoft platforms like Apache Web Server. The .aspx file can run on any platforms, be it Microsoft or not. Hence .aspx file can be executed in Apache Web Server as well.

The .asp file can be coded in The .aspx file can be coded using only two languages namely any .NET language including VBScript and Javascript. Both VB.NET, C#. Both VB.NET and C#

these languages are client side are Server Side Languages. languages. 6 In .asp file, the executable code can be included outside a function scope where in the function is located inside the script block marked as runat=server. In .aspx file, the executable code cannot be included outside a function scope where in the function is located inside the script block marked as runat=server.

In .asp file, a function can be In .aspx file, a function cannot be defined inside server side defined inside server side script script tags. tags. In .asp file, all the directives will be placed in the pages first line using <%@Page Language= Jscript %> tag. In .aspx, the language directive must be enclosed within page directive as <%@Page Language= VB %>

3.Difference between thread and process S.No 1 Thread Process

Threads share the address Processes have their own address. space of the process that created it. Threads have direct access to Processes have their own copy of the data segment of its the data segment of the parent process process. Threads can communicate with threads of its process Threads have overhead directly Processes must use interprocess other communication to communicate with sibling processes. no Processes overhead have considerable

4 5 6

almost

New threads are easily created New processes require duplication of the parent process. Threads can exercise Processes can considerable control over control over threads of the same process child processes only exercise

Changes to the main thread Changes to the parent process (cancellation, priority change, does not etc.) may affect the behavior of affect child processes. the other threads of the process

Another good reference: http://www.differencebetween.net/miscellaneous/difference-between-thread-and-process/ 4.Difference between ASPX and ASCX S.No 1 ASPX ASP.NET Page uses extension .aspx For eg: Default.aspx ASCX the User Control uses the extension .ascx For eg: WebUserControl.ascx.

ASP.NET Page begin with a User Control begin with a Control Page Directive. Directive. For eg: For eg: <%@ Page Language="C#" <%@ Control Language="C#" AutoEventWireup="true" AutoEventWireup="true" CodeFile="Default.aspx.cs" CodeFile="WebUserControl.ascx.c Inherits="_Default" %> s" Inherits="WebUserControl" %> Usercontrol code can be used We can not use webforms in in webforms usercontrol. ASP.NET Page can be viewed User Control cannot be viewed directly in the Browser. directly in the browser. User Controls are added to WebPages and we view them by requesting a web page in our browser ASP.NET page has HTML, User Control does not have a Body or Form element. HTML, Body or Form element.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/aspnet-difference-faqs-7.html

ASP.NET Difference FAQs-8


1.Difference between HTML Controls and ASP.NET Standard Controls S.No 1 2 HTML Controls ASP.NET Standard Controls

All HTML Controls run at Client All ASP.NET Controls run at Server side side Can be made to run at Server Cant be made to run at Client side side by adding runat=server rather equivalent HTML code is attribute generated on Rendering Rendering is NOT Required Execution is FAST Rendering is Required Execution is SLOW

3 4

5 6 7

Dont contain any class for the Contains Separate class for each Controls Controls Dont support Object Oriented Supports Object Programming features Programming Features Dont provide MANAGEMENT Oriented

STATE Provides STATE MANAGEMENT

2.Difference between Response.Redirect and Server.Transfer S.No 1 2 Response.Redirect Used to redirect to webpage in any website Server.Transfer any Used to redirect to any webpage in current website only

Can be used to pass the Cant be used to pass the required required values from Source values from Source Page to Target Page to Target Page while Page while redirecting redirecting Execution is Slow Execution is Fast

3 4 5

Target page address appears Target page address doesnt within the address bar appears within the address bar Refreshing of the page doesnt Refreshing of the page causes cause any error error

3.Difference between ASP.NET and ASP.NET MVC S.No 1 2 ASP.NET ASP.NET MVC &

You need .NET framework to You need .NET framework install ASP.NET. ASP.NET to Install MVC.

Supports Code behind page Supports both Code behind page coding & Inline coding coding & Inline coding but, we should not use code behind as a practice because view should not perform any logic. Pages are called Pages Pages are called Views

3 4

There is a Life cycle for every There is tailored lifecycle of the page. page. By default you won't see the events when you create the Views but, you can add the Page Load event by in a script server tag. Again its not a good practice We use Viewstate concept There is no Viewstate for view. extensively There is no state of the controls. But state of the entire page can be maintained by a feature

ModelBinders 6 Every Page is inherited from Every Page is inherited from System.Web.UI.ViewPage System.Web.Mvc.ViewPage. View page is inherited from System.Web.UI.Page. You don't have the strongly You can create the Strongly typed typed pages Views using generics. It means, you can pass the object (Model) to the view page from the controller. Has lot of inbuilt Controls that We cannot use the ASP.NET support RAD. controls because they don't support the ViewState and Postback. We have inbuilt methods called HTML Helper methods. These methods just create the required HTML in the response stream. You can create the user controls. 9 Has the limited control over the Since we have no controls and are HTML being generated by writing HTML we have control over various controls. the markup. Logic is not completely Logic is modularized in methods modularized in pages. called Action methods of the controller. Difficult to test the UI Logic MVC is designed to unit test using unit tests. every part of the application. It strongly supports the TDD approach. Doesn't support clean or search engine friendly URL's . ASP.NET 4 has the routing module or else we need to use URL rewrites. Support clean or search engine friendly URL's You can design to support the REST based resources in application

10

11

12

13

Code behind supports only one Web request finally will reach aspect of separation of the controller. Requests never concerns. reach Views. Web user cannot identify a specific view on the server. Web requests are reached directly to the intended page. Web users can identify the pages on the server. Web request finally will reach the controller. Requests never reach Views. Web user cannot identify a specific view on the server.

14

15

If you rename the web pages You don't need to change the URL, the URL is changed even if you change the Controller and the View. URLS are determined by the You have to define the URL folder structure of the pages formats which are called Routes. Framework will try to match the URL with all the defined routes in an order. Framework will hand over the request to the corresponding route Handler. Query string are used as small URLS formats drive the inputs to inputs to the pages the requests. You can also have querystrings Related Pages are separated Related Views are written under by folder controller. And for each controller we need to create a folder for all its views. We have ASP.NET AJAX Framework and AJAX server side controls to support AJAX page development MVC has some AJAX features but internally it uses the ASP.NET AJAX script libraries. So we have to manually include the libraries in the project. No support of AJAX Server side controls. There are no file extensions for MVC. If deployed in IIS7 Internally it will use the MVC UrlRoutingModule to route the request to the MVC framework.

16

17

18

19

20

File extensions in IIS are mapped to ASP.NET isapi dll and in web.config they are mapped to corresponding file HTTPHandlers.

21

All the Page requests are Each Route has the option to use a handled by PageFactory default Route handler or custom Handler. handler. So all the page requests are handled by Route handles. It's difficult to modify the It's designed to modify or replace internal behavior of the core the internal components. It ASP.NET components. supports the Plug-in structure Example: - ASPX Pages are used to render the HTML. You can configure to not to use ASP.NET pages and use different view engines. There are many view engines available in market or you can

22

create your own view engine. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/aspnet-difference-faqs-8.html

Difference Between HttpHandler and HttpModule


Difference between HttpHandler and HttpModule S.No 1 HttpHandler Meaning: An ASP.NET HTTP handler is the process (frequently referred to as the "endpoint") that runs in response to a request made to an ASP.NET Web application. The most common handler is an ASP.NET page handler that processes .aspx files. When users request an .aspx file, the request is processed by the page through the page handler. We can create our own HTTP handlers that render custom output to the browser.In order to create a Custom HTTP Handler,we need to Implement IHttpHandler interface(synchronous handler) or Implement IHttpAsyncHandler(asynchrono us handler). 2 RSS feeds: To create an RSS feed for a Web site, we can create a handler that emits RSS-formatted XML. We can then bind a file name extension such as .rss to the custom handler. When users send a request to your site that ends in .rss, ASP.NET calls our handler to process the request. Image server: If we want a Web application to serve images in a variety of sizes, we can write a custom handler to HttpModule Meaning: An HTTP module is an assembly that is called on every request that is made to our application. HTTP modules are called as part of the ASP.NET request pipeline and have access to life-cycle events throughout the request. HTTP modules examine incoming and outgoing requests and take action based on the request.

When to use HTTP modules: Security: Because we can examine incoming requests, an HTTP module can perform custom authentication or other security checks before the requested page, XML Web service, or handler is called. In Internet Information Services (IIS) 7.0 running in Integrated mode, we can extend forms authentication to all content types in an application. Statistics and logging: Because

resize images and then send them to the user as the handlers response.

HTTP modules are called on every request, we can gather request statistics and log information in a centralized module, instead of in individual pages. Custom headers or footers: Because we can modify the outgoing response, we can insert content such as custom header information into every page or XML Web service response.

How to develop an ASP.NET How to develop a Http Module: handler: All we need is implementing All we need is implementing System.Web.IHttpModule interface. IHttpHandler interface public class MyHttpModule : public class MyHandler IHttpModule :IHttpHandler { { public void Dispose() public bool IsReusable { { get { return false; } } } public void Init(HttpApplication public void context) ProcessRequest(HttpContext { context) //here we have to define handler for { events such as BeginRequest ,PreRequestHandlerExecute } ,EndRequest,AuthorizeRequest } and .... } // you need to define event handlers here }

Number of HTTP handler Number of HTTP module called: called: Whereas more than one HTTP During the processing of an modules may be called. http request, only one HTTP handler will be called. Processing Sequence: Processing Sequence:

In the asp.net request pipe line In the asp.net request pipe line, ,http handler comes after http http Module comes first.

Module and it is the end point objects in ASP.NET pipeline. 6 What it does actually? HTTP Handler actually processes the request and produces the response 7 What it does actually? HTTP module can work on request before and on the response after HTTP Handler

HTTP Handler implement Http Module implements following Methods and following Methods and Properties: Properties: Process Request: This method is called when processing asp.net requests. Here you can perform all the things related to processing request. IsReusable: This property is to determine whether same instance of HTTP Handler can be used to fulfill another request of same type. InIt: This method is used for implementing events of HTTP Modules in HTTPApplication object. Dispose: This method is used perform cleanup before Garbage Collector destroy everything.

Summary: If we need to create a request handler, for example we may want our own code to handle all .jpg image file requests like: http://mysite.com/filename.jpg, then we need to use HttpHandlers for this purpose.

Summary: If we want to modify a certain request, like we may want to perform some custom logic behind the scenes whenever user requests pages like mysite.com/default.aspx, we need to use HttpModules. We can create multiple HttpModules to filter any request.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-httphandler-and.html

ASP.NET Difference FAQs-9


1.Difference between .NET Application Development and Traditional Application Development S.No 1 .NET Application Development Using .NET Framework, your program will be compiled into an intermediate language representation called MSIL Traditional Application Development Your program will be compiled into an assembly language code that is very specific to the platform in which you are running your

(Microsoft Language). 2

Intermediate application.

MSIL code will not contain any Assembly language code will API calls specific to any contain API calls specific to the platform. current application platform. This MSIL code is then This assembly language code is converted into machine code then converted into machine code. at runtime using CLR (Common Language Runtime). Optimization is done at runtime Optimization is done by the by CLR. compiler itself at compile time. The compiler used in this The compiler is not static. It process is static meaning that performs both compilation as well it checks only for syntax and as optimization. the necessary semantics. Libraries used by your program Libraries used by your program are are linked even before linked only after generating the generating MSIL, but it is machine code. linked in an un-compiled form. This will be compiled by the compiler and it will be used by the CLR while executing the program. The program will not directly call APIs of the operating system. Instead CLR will act as a mediator. CLR will call API's of operating system and the result of execution will be returned to program. Now the program is ready for execution by the operating system. The program will directly call APIs of the operating system.

4 5

Automatic memory No automatic memory management and garbage management or garbage collection. collection is done by CLR. .NET Framework Class Library No object oriented principles are provides object oriented incorporated. libraries.

2.Difference between CSS and Themes S.No 1 2 CSS Applies to all HTML Controls Themes Applies to all the server controls

Is applied on the Client Side in Is applied on the server rather than the Browser in the browser

We can apply multiple style But we cannot apply multiple sheets to a single page themes to a single page. Only one theme we can apply for a single page. The CSS supports cascading But themes cascading does not support

4 5

The CSS cannot override the But any property values defined in property values defined for a a theme, the theme property control. overrides the property values declaratively set on a control, unless we explicitly apply by using the StyleSheetTheme property. Cannot be Applied through the Can be Applied configuration files Configuration Files. through

6 7

Can be used directly via a All theme and Skin files should be reference to the css file placed in a special Asp.net folder location called the App_Themes in order for the themes to work and behave normally. Do not require any resource like Skin files other Each theme should be associated with at least one Skin file.

8 9

In case of CSS you can define But a theme can define multiple only style properties properties of a control not just style properties such as we can specify the graphics property for a control, template layout of a GridView control etc.

3.Difference between Postback and Callback S.No 1 Postback A Postback occurs when the data (the whole page) on the page is posted from the client to the server..ie the data is posted-back to the server, and thus the page is refreshed. Callback A callback is also a special kind of postback, but it is just a quick round-trip to the server to get a small set of data(normally), and thus the page is not refreshed, unlike with the postback.

With Asp.Net, the ViewState is With Asp.Net, the ViewState is not refreshed when a postback is refreshed when a callback is invoked. invoked.

A postback occurs when a request is sent from the client to the server for the same page as the one the user is currently viewing. When a postback occurs, the entire page is refreshed and you can see the typical progression on the progress bar at the bottom of the browser.

A callback, generally used with AJAX, occurs when a request is sent from the client to the server for which the page is not refreshed, only a part of it is updated without any flickering occurring on the browser.

4.Difference between Session.Clear() and Session.Abandon() S.No 1 Session.Clear() Session.Clear() just removes all values (content) from the Object. The session with the same key is still alive.It is just like giving value null to this session. Use Session.Clear(), if we want user to remain in the same session and we don not want user to relogin or reset all his session specific data. Session.Abandon() Session.Abandon() destroys the session and the Session_End event is triggered and in the next request, Session_Start will be fired.

So, if we use Session.Abandon(), we wil lose that specific session and we will get a new session key. We could use it for example when the user logs out.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/aspnet-difference-faqs-9.html

Difference between ASP.Net 2.0 and ASP.Net 3.5


Difference between ASP.Net 2.0 and ASP.Net 3.5 SNo 1 Feature New Features ASP.Net 2.0 ASP.Net 2.0 includes the following as new features, 1. Master Pages 2. Profiles 3. GridView Control ASP.Net 3.5 ASP.Net 3.5 includes the following as new features, 1. 2. 3. 4. ListView Control DataPager Control Nested Master Pages LinqDataSource Control

Multi-targeting

ASP.Net 2.0 does not support Multi-Targeting environment.

ASP.Net 3.5 supports multitargeting. It means that we choose from a drop-down list whether to have Visual Studio 2008 build applications against the ASP.NET 2.0, 3.0, or 3.5

frameworks. 3 AJAX Support There is no in-built support for AJAX in ASP.Net 2.0. Instead, it has to be downloaded and installed. It does not support Siverlight. It does not provide Javascript debugging. It does not support LINQ. In ASP.Net 3.5, AJAX is integrated into the .NET Framework, thereby making the process of building intuitive cool user interfaces easier. It supports Siverlight. It provides Javascript debugging. It Supports Language Integrated Query (LINQ).

4 5 6

Siverlight Support Javascript Debugging LINQ Support

Reference: http://onlydifferencefaqs.blogspot.in/2012/07/difference-between-aspnet-20-andaspnet.html

ASP.NET Difference FAQs-10


1.Difference between Invoke() and BeginInvoke() S.No 1 Invoke() Delegate.Invoke: Executes synchronously, the same thread. 2 Control.Invoke: BeginInvoke() Delegate.BeginInvoke: on Executes asynchronously, on a threadpool thread. Control.BeginInvoke:

Executes on the UI thread, but Executes on the UI thread, and calling thread waits for calling thread doesnt wait for completion before continuing. completion. 2.Difference between Build and Release S.No 1 Build Release

BUILD is still running in testing RELEASE is no longer with testing that is released to testers for and release to Customers/Clients. testing BUILD occur more frequently RELEASE occur less frequently. of

2 3

BUILD is process of converting RELEASE is a process source code in to executable delivering the project to client code (.exe)

3.Difference between Windows forms and Web forms S.No 1 Windows forms Web forms

They do not need a web They need a web browser as well browser or web server to as a web server(on the server execute. machine only). They execute through their They execute through the dll of the respective exe files web application which is then processed by IIS and the .net framework. They run on the same machine They run on a remote server and they are displayed on. are displayed remotely on the clients Their single instance exists Every time they are submitted, their until we close them or dispose new instance is created. them through coding Used for developing games, Used in web site development. inventory management, system utiltites etc. They run under Code Access They use role based security Security.

4.Difference between Master Page and Content Page in ASP.NET S.No 1 Master Page Content Page

Files with .Master extension. Files with .aspx extension. Introduced in ASP.NET 2.0. Example: Example: Code file: .aspx.cs or .aspx.vb code file: .master.cs or .master.cs extension These have a control known as the Content Placeholder which reserves a storage location in which we can place the contents of a .aspx page. The common part for the .aspx pages will be outside the Content Placeholder two Content Placeholders are by default, but we can increase or decrease the Content Placeholders as per our needs. These do not have any Content Placeholder control which makes it somewhat difficult in providing proper layout and alignment for large designs.

MasterPageFile attribute is Register Tag is added when we added in the Page directive of drag and drop a user control onto the .aspx page when a Master the .aspx page. Page is referenced in .aspx page. The .aspx page that uses the Master page i known as Content Page. Can be referenced using Web.Config file also or dynamically by writing code in PreInit event. Can be attached dynamically using Load Control method. PreInit event is not mandatory in their case for dynamic attachment.

More suitable for large Suitable for small designs(Ex:1) designs(ex: defining the logout button on every .aspx page. complete layout of .aspx page)

Sample Code For Master Page <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Untitled Page</title> <asp:ContentPlaceHolder id="head" runat="server"> </asp:ContentPlaceHolder> </head> <body> <form id="form1" runat="server"> <div> <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> </div> </form> </body> </html> Sample Code For Content Page <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" Title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

</asp:Content> Reference: http://onlydifferencefaqs.blogspot.in/2012/08/aspnet-difference-faqs-10.html

ASP.Net Difference FAQs-11


1.Difference between XML Serialization and Binary Serialization S.No 1 2 3 XML Serialization Binary Serialization (SOAP)

No need of Serializable Need Serializable attribute attribute on the class Only public serialized members are All members are serialized unless specified as NonSerializable

Class should have default No need of default constructor or public constructor and class public access itself should have public access. Namespace: System.XML.Serialization Outputfile is XML Namespace: System.Runtime.Serialization.Form atteres.Binary (.Soap) Outputfile is Binary or XML for SOAP formatter

5 6

XMLSerializer need type of No need to specify type of object to object to be serialized or be serialized or deserialized. deserialized Support only Binaryformatter support binary IDesrializationCallback events. Soap formatter supports interface. No support for binary only IDeserializationCallback events. interface

2.Difference between CurrentCulture and CurrentUICulture S.No 1 CurrentCulture CurrentCulture property affects how the .NET Framework handles regional options (dates, currencies, sorting, formatting, etc.) for the current user.i.e., it provides cultural context for formatting and parsing (for ex. to parse dates or numbers) A date is often written like '10/30/2000' by Americans, but '30/10/2000' by Irish people, and 30.10.2000 CurrentUICulture CurrentUICulture property determines which satellite assembly is used when loading resources and reflects the UI language for the current user.i.e., it provides the cultural context for localization, i.e. translation of resources.

by Germans etc. 2 CurrentCulture does not CurrentUICulture supports neutral support neutral cultures (i.e. cultures (i.e. "en", "fr" ...) "en", "fr" ...). It is always a specific culture (i.e. "en-GB", "de-AT", "pt-BR")

Example for CurrentCulture - To parse the date in asp.net: using System.Threading; using System.Globalization; DateTime dt; // this is a British English date format string dateStr = "31/10/2001"; // parse it with British English culture Thread.CurrentThread.CurrentCulture = new CultureInfo("en-GB"); bool parseOk = DateTime.TryParse(dateStr, out dt); // parseOk: true -- dt: {31/10/2001 00:00:00} Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); parseOk = DateTime.TryParse(dateStr, out dt); // parseOk: false-- dt: {1/1/0001 12:00:00 AM} ... Example for CurrentUICulture - To get the resources in asp.net: using System.Threading; using System.Globalization; string culture = "en"; Thread.CurrentThread.CurrentUICulture = new CultureInfo(culture); string hello = (string)HttpContext.GetGlobalResourceObject("myClassKey", "myResourceKey"); // and now French string culture = "fr"; Thread.CurrentThread.CurrentUICulture = new CultureInfo(culture); string hello = (string)HttpContext.GetGlobalResourceObject("myClassKey", "myResourceKey"); ... 3.Difference between Forms Authentication and Windows Authentication S.No 1 Forms Authentication Forms authentication enables us to identify users with a custom database, such as an ASP.NET membership database. Alternatively, we can implement our own custom database. Once authenticated, Windows Authentication Windows authentication enables us to identify users without creating a custom page. Credentials are stored in the Web servers local user database or an Active Directory domain. Once identified, we can use the users credentials to

we can reference the roles the gain access to resources that are user is in to restrict access to protected by Windows portions of our Web site. authorization. 2 Form authentication is Windows authentication is best preferable for the applications suited for the application which is which have diversified users meant for a corporate users from several places. In case of form authentication, User lists for windows lists are there in 'credential' authentication are found in element of web.config file. 'authorization' element There is no such classification There are four different kinds of available in Forms Windows authentication options authentication. available that can be configured in IIS 1)Integrated Windows authentication 2) Basic and basic with SSL authentication 3) Digest authentication 4) Client Certificate authentication

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/aspnet-difference-faqs-11.html

Difference Between CTS and CLS


Difference between CTS and CLS S.No 1 CTS Abbreviation: CLS Abbreviation:

CTS stands for Common Type CLS stands for Common Language System Specification 2 It describes how types are declared, used and managed in the runtime and facilitates cross-language integration, type safety, and high performance code execution. The types defined by the CTS are broadly classified into value types and reference types. Value types are those which themselves contain data/methods/resources represented by the type - like Meaning: It is a specification that defines the rules to support language integration in such a way that programs written in any language, yet can interoperate with one another, taking full advantage of inheritance, polymorphism, exceptions, and other features. These rules and the specification are documented in the ECMA proposed standard document.

an integer variable is a value type. Reference types are those which refer to value types and a pointer or a reference is an example of such a type. All types derive from 'System.Object' base type. 3 Power of CTS: Power of CLS:

CTS is a superset of the CLS is a subset of the CTS which CLS,i.e.,all .NET languages all .NET languages are expected to will not support all the types in support. the CTS. 4 Example: Integer datatype in VB and int datatype in C++ are not compatible, so the interfacing between them is very complicated. In order that two different languages can communicate, Integer in VB6 and int in C++ will convert to System.int32 which is datatype of CTS. (or) In c#, we will declare int i; In vb, we will declare dim i as integer Basically Microsoft will convert all this data types to the generic data types. So, if we write code in different languages that will convert into language independent code. This is called Common type system(CTS). Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-cts-and-cls.html Example: A class written in C# can inherit from a class written in VB. So we can say that using this specification (CLSCompliant attribute) in our programs (written in any language), the type is forced to conform to the rules of CLS and programs can interoperate with one another, taking full advantage of polymorphism, inheritance and other features.

Difference between OLEDB Provider and SqlClient


S.No 1 OLEDB Provider SqlClient

OLEDB Provider is slower than The SqlClient data provider is faster than the Oracle provider, and SqlClient data provider even more faster than accessing database through the OLEDB layer. Reason for being faster is, it access the native library which generally gives us a better performance and it has also got a lot of support from SQL Server team online.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-oledb-providerand.html

Difference between Two Tier and Three tier Architecture


S.No 1 2 Two-tier Architecture Client -Server Architecture Client will hit request directly to server and client will get response directly from server Three -tier Architecture Web -based application Here in between client and server middle ware will be there, if client hits a request it will go to the middle ware and middle ware will send to server and vice versa. 3-tier means 1) Design layer 2) Business layer or Logic layer 3) Data layer

2-tier means 1) Design layer 2) Data layer

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-two-tier-andthree.html

Difference between Pre-Render and Render events in ASP.NET page execution


S.No 1 Pre-Render This event is used for modifying server controls just before sending them to client. Render This event is used to put the HTML output to the response stream

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-pre-render-and.html

Difference between Response.TransmitFile and Response.WriteFile


S.No 1 Response.TransmitFile It sends the file to the client without loading it to the Application memory on the server. It is the ideal for if the file size being download is large. Response.WriteFile It loads the file being download to the servers memory before sending it to the client. If the file size is large, the ASPNET worker process might be get restarted.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-betweenresponsetransmitfile.html

Difference between Layer and Tier


Difference between Layer and Tier S.No 1 Layer It refers to the separation of the logic (i.e the code and design) that is developed for an application in different files. Tier It refers to the physical location of the Layer files.

Example: In an ASP.NET web site, we create GUI web forms, business logic , data access logic, database all in one computer. In this case, we have 4 layers and 1 Tier. if the GUI Web Forms,business logic, data access logic and database are all in different computers, we have 4 layers and 4 Tiers. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-layer-and-tier.html

Difference between Response.Write and Response.Output.Write


Difference between Response.Write and Response.Output.Write S.No 1 Response.Write Response.Output.Write

Response.Write does not allow Response.Output.Write allows us us to write a more formatted to write a more formatted output. output. As per ASP.NET 3.5, Response.Write has 4 overloads Response.Output.Write has 17 overloads.

Example-1: To write integer,double, boolean values using Response.Write, we are provided with one overloaded version:-> Response.Write(object obj);

To do the same thing using Response.Output.Write, we are provided with separate overloaded versions : ex:1) Response.Output.Write(int s); 2) Response.Output.Write(double s); 3) Response.Output.Write(bool b); Example-2: Response.Output.Write("hello {0}", "asp.net"); //It is Ok But, Response.Write("hello {0}","asp.net"); //It is wrong Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-responsewriteand.html

Difference between Response.Write() and Response.WriteFile()


Difference between Response.Write() and Response.WriteFile() S.No 1 Response.Write() It writes information to the Http Response and can be used to display strings in the output. Example: Response.Write("welcome"); Response.WriteFile() It writes the specified file directly to an HTTP response output stream. Example: Response.WriteFile("demo.txt");

Response: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-responsewriteand_23.html

ASP.Net Difference FAQs-12


1.Difference between .NET 1.1 and 2.0 S.No 1 .NET 1.1 Support for application: No Generics: No SQL cache dependency: No Master pages: No Membership and roles: No 64 .NET 2.0 bit Support for 64 bit application: Yes Generics: Yes SQL cache dependency: Yes Master pages: Yes Membership and roles: Yes

2 3 4 5

2.Difference between .NET 2.0 and 3.0 S.No 1 2 3 4 .NET 2.0 WCF: No WPF: No WWF: No WCS ( card space) : No .NET 3.0 WCF: Yes WPF: Yes WWF: Yes WCS ( card space) : Yes

3.Difference between .NET 3.0 and 3.5 S.No 1 2 3 4 5 .NET 3.0 LINQ : No Ajax inbuilt: No ADO Entity framework: No ADO data services: No Multi targeting: No .NET 3.5 LINQ : Yes Ajax inbuilt: Yes ADO Entity framework: Yes ADO data services: Yes Multi targeting: Yes

4.Difference between .NET 3.5 and 4.0 S.No 1 2 3 4 5 6 .NET 3.5 MEF : No Parallel computing: No DLR dynamic: No Code contract : No Language runtime: No Lazy initialization: No .NET 4.0 MEF : Yes Parallel computing: Yes DLR dynamic: Yes Code contract : Yes Language runtime: Yes Lazy initialization: Yes

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/aspnet-difference-faqs-12.html

Difference between lock and Monitor.Enter()


Difference between lock and Monitor.Enter() S.No 1 lock lock keyword basically provides a shortcut to Enter method of Monitor class. Monitor.Enter() Monitor is used to provide thread synchronization.It means till the Thread in which the method is being used finishes its task, no other thread can access the object.

Example: lock (object) { } It is compiled into Monitor.Enter(object); try { //code } finally { Monitor.Exit(object); } Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-lock-andmonitorenter.html

Difference between Encoding and Encryption


Difference between Encoding and Encryption S.No 1 Encoding Purpose: The purpose of encoding is to transform data so that it can be properly (and safely) consumed by a different type of system. For maintaining data usability i.e.,to ensure that it is able to Encryption Purpose: The purpose of encryption is to transform data in order to keep it secret from others.

Used for: For maintaining data confidentiality

be properly consumed.

i.e., to ensure the data cannot be consumed by anyone other than the intended recipient(s). Data Retrieval Mechanism: Original data can be obtained if we know the key and encryption algorithm used. Algorithms Used: AES, Blowfish, RSA Example: Sending someone a secret letter that only they should be able to read, or securely sending a password over the Internet.

Data Retrieval Mechanism: No key and can be easily reversed provided we know what algorithm was used in encoding. Algorithms Used: ASCII, Unicode, URL Encoding, Base64 Example: Binary data being sent over email, or viewing special characters on a web page.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-encoding-and.html

DataReader vs DataSet vs DataAdapter


Difference between DataReader,DataSet and DataAdapter S.No 1 2 DataReader Database Connecting Mode: Connected mode Data Navigation: Unidirectional i.e., Forward Only Read / Write: Only Read operation can be carried out. Data Handling: Handles Database table Storage Capacity : No storage Accessibility : Can access one table at a time DataSet / DataAdapter Database Connecting Mode: Disconnected mode Data Navigation: Bidirectional i.e., data can navigate back and forth Read / Write: Both Read and Write operations are possible Data Handling: Handles text file, XML file and Database table Storage Capacity : Temporary Storage Capacity i.e., in-memory cache of data Accessibility : Can access multiple table at a time

Speed: Much faster than DataSet

Speed: Less faster than data reader

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-betweendatareaderdataset.html

DataTable vs DataSet
Difference between DataTable and DataSet S.No 1 DataTable Meaning: A DataTable is an in-memory representation of a single database table which has collection of rows and columns. Number of rows retrieved at a time: DataTable fetches only one TableRow at a time Provision of DataRelation Objects: As DataTable is a single database table, so there is no DataRelation object in it. Enforcing Data Integrity: In DataTable, there is no UniqueConstraint and ForeignKeyConstraint objects available. DataSource can be Serialized or Not: In DataTable, DataSource cannot be serialized. DataSet Meaning: A DataSet is an in-memory representation of a database-like structure which has collection of DataTables. Number of rows retrieved at a time: DataSet can fetch multiple TableRows at a time Provision of DataRelation Objects: In DataSet, DataTable objects can be related to each other with DataRelation objects. Enforcing Data Integrity: In DataSet, data integrity is enforced by using the UniqueConstraint and ForeignKeyConstraint objects. DataSource can be Serialized or Not: DataSet is serialized DataSource .That is why web services can always returns DataSet as the result but not the DataTables.

Example for DataTable: sqldataadapter da = new SqlDataAdater("select * from Employee", con); DataTable dt = new DataTable();

da.Fill(dt); datagridview1.DataSource = dt; Example for DataTable: sqldataadapter da= new SqlDataAdater("select * from Employee", con); DataSet ds = new DataSet(); da.Fill(ds); datagridview1.DataSource = ds.table[0]; Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-datatable-anddataset.html

Difference between div and table


Difference between div and table S.No 1 Div Purpose: To display block of HTML and data Layout / Type: DIV is floating type and can divide our webpage into multiple divisions..So,Divs are more flexible--as they do not strict to tabular layouts. Search Engine Friendly: Div is better for SEO Loading Time: The loading time of DIV based website is faster than Table based website. Website Alignment: In DIV,we can control the website alignment by CSS which is comparatively easier than table Table Purpose: To display Text and in fewer cases images as well. Layout / Type: Table is Fixed type and consists of table rows(tr), table data(td),table header(th). .So,tables are strict for those layouts which are more tabular. Search Engine Friendly: Table is not Search engine friendly Loading Time: The loading time of table based website is not faster than DIV based website. Website Alignment: Table does not make use of CSS, hence website alignment is comparatively difficult

3 4

Website Changes: Website Changes: In Div, designers can make a In table, designers cannot make a single change to the CSS and single change as like DIV it will modify the entire website. Does CSS Knowledge required ?For Div based layout, we should have knowledge about CSS. Otherwise, we cannot control Does CSS Knowledge required ? Table based website does not require CSS Knowledge in oder to control the website errors

the Div based website errors. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-div-and-table.html

RegisterClientScriptBlock vs RegisterStartupScript
Difference between Page.RegisterClientScriptBlock and Page.RegisterStartupScript S.No 1 Page.RegisterClientScriptBlock RegisterClientScriptBlock places the script at the top of the page right after the starting 'form' tag . The code cannot access any of the form's elements because, at that time, the elements have not been instantiated yet. RegisterClientScriptBlock is meant for functions that should be "available" to the page. For this they are rendered at the start of the HTML file. In this case the page content will be blocked. Page.RegisterStartupScript RegisterStartupScript places the script at bottom of page right before the ending 'form' tag. The code can access any of the form's elements because, at that time, the elements have been instantiated. RegisterStartupScript is meant for commands that should execute on page load (at the client), so that page needs to be available for the script. This script is rendered at the end of the HTML file. In this case the content of the page will be diplayed first and then script will run.

Example for RegisterStartupScript: if (!Page.IsStartupScriptRegistered("CH")) Page.RegisterStartupScript("CH", "script goes here"); Example for RegisterClientScriptBlock: if (!Page.IsClientScriptBlockRegistered("CH")) Page.RegisterClientScriptBlock("CH", "script goes here"); Note: The choice of which method to use really depends on the "order" in which we want our script to be run by the browser when rendering the page. Take an example of a javascript function that populates a Textbox using a javascript function when a page is loaded. If we use the RegisterClientScriptBlock method, the

javascript function will give an error. This is because our script is placed at the top of the page when it was loaded (when the textbox was not even created). So how can it find the textbox and populate the values. So in this case RegisterStartupscript should be used. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-betweenpageregisterclientsc.html

UniqueID vs ClientID
Difference between UniqueID and ClientID S.No 1 UniqueID Meaning: UniqueID is also a uniquely identifiable ID for a control but only used by ASP.Net page framework to identify the control. i.e., UniqueID = HTML's name attribute 2 Delimiter used: It uses $ to include parent controls (container) ID to make it unique. Delimiter used: It uses _ to include parent controls (container) ID to make it unique. ClientID Meaning: ClientID is a unique ID string that is rendered to the client to identify the control in the output HTML. i.e., ClientID = HTML's id attribute

For example, For example, ct100_ContentPlaceHolder1_txtLo ct100$ContentPlaceHolder1$tx gin. tLogin 3 UniqueID Generation: Similar to ClientID, UniqueID is also generated by appending the parent container's(parent control) ID with the original control id but with $ delimiter ClientID Generation: The client id for control will be generated by appending the parent container's(parent control) ID with the original control id with "_" as delimeter. In our example, ContentPlaceHolder1 is the ContentPlaceHolder ID of the master page which is the parent container for txtLogin. How to get CientID of a control ? For example, use txtLogin.ClientID for ct100_ContentPlaceHolder1_txtLo gin.

How to get UniqueID of a control ? For example, use txtLogin.UniqueID for ct100$ContentPlaceHolder1$tx tLogin

Where to use ? The unique id is used by the ASP.NET framework to identify the control when the page is posted back to the server. i.e., UniqueID is used for server-side

Where to use ? The client id can be used to identify the control in client side scripting like javascript. i.e., ClientID is used for client-side

Note: ClientID = HTML's id attribute and so when doing getElementById, we should always give the ClientId. Instead, if we give UniqueID i.e., getElementById(Element's name), FireFox will fail. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-uniqueid-andclientid.html

PlaceHolder vs ContentPlaceHolder
Difference between PlaceHolder and ContentPlaceHolder S.No 1 PlaceHolder A PlaceHolder control is used as a container for any controls we wish to add and can be used on any page. ContentPlaceHolder A ContentPlaceHolder is used to hold content from Content Pages and can only be used on a Master Page.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-placeholder-and.html

Panel vs PlaceHolder
Difference between Panel and PlaceHolder S.No 1 Panel What tag rendered in output ? Panel will render Div tags in the brower Does it provide Styling Attributes ? Panel have the styling capabilites, so we can set the cssclass or style properties such as background-color, forecolor etc.. PlaceHolder What tag rendered in output ? PlaceHolder will not render any tags Does it provide Styling Attributes ? Placeholder does not have any style attributes associated. We can not set cssclass or forecolor etc...

Automatic Width Adjustment: Panel cannot adjust width automatically if controls are added in it. Memory Size: Panel is heavy in memory size as compare to PlaceHolder When to use ? If we want to use it to separate controls visually, then we have to use Panel control.

Automatic Width Adjustment: PlaceHolder can adjust width automatically if controls are added in it. Memory Size:PlaceHolder is light in memory size as compare to Panel. When to use ? If we just want a container, without all the Display properties, then we have to use PlaceHolder control.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-panel-andplaceholder.html

Difference between URL and URI


Difference between a URL and a URI S.No 1 2 URL URL stands for Uniform Resource Locator URL is a subset of URI that specifies where an identified resource is available and the mechanism for retrieving it.Meachanism actually means one of the potocol schemes (e.g., http, ftp, file, mailto) provided by URI. URI URI stands for Uniform Resource Identifier A URI is a superset of URL that identifies a resource either by location (URL), or a name(URN), or both (URL and URN).

Examples for URL: http:/www.dotnetfunda.com/users/login.aspx Here, http is the protocol, dotnetfunda.com is the domain name, users is the folder name, login.aspx is the filename http://dotnetfunda.com/articles/default.aspx Here http is the protocol, dotnetfunda.com is the domain name, articles is the folder name and default.aspx is the file name Examples for URI: www.dotnetfunda.com /some/page.html

Summary: 1. 2. 3. 4. 5. 6. 7. A URI is either a URL or a URN. Every URL is a URI. Every URN is a URI. A URN is never a URL. A URL is never a URN. Every URI is not a URL If the URL describes both the location and name of a resource, the term to use is URI. Since this is generally the case most of us encounter everyday, URI is the correct term.

Here, URI --> A Uniform Resource Identifier(URI) is used to identify something on the World Wide Web. URN --> Uniform Resource Name (URN), a type of URI, basically states what something is, but do not have information on how to access it. URL --> Uniform Resource Locator (URL), a type of URI, contains the location of something and tell the client program (usually a browser) how to access it. Simply put, a URN is the name of something and the URL is the name and address. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-url-and-uri.html

ASP Session vs ASP.NET Session


Difference between ASP Session and ASP.NET Session S.No 1 ASP Session Session type support: As ASP only supports InProc Session, so it cannot span across multiple servers. Process dependency: In ASP, the session is Process dependent i.e., ASP session state is dependent on IIS process very heavily. So if IIS restarts ASP session variables are also recycled. Cookie dependency: In ASP, the session is Cookie dependent i.e., ASP session ASP.NET Session Session type support: ASP.NET supports both InProc and OutProc (StateServer and SQLServer) Sessions.Hence, it can span across multiple servers. Process dependency: In Asp.Net, the session is Process independent i.e., ASP.NET session can be independent of the hosting environment thus ASP.NET session can maintained even if IIS reboots.

Cookie dependency: As ASP.NET supports Cookieless session, so the session in ASP.NET

only functions when browser supports cookies.

is Cookie independent.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-asp-session-and.html

Authentication vs Authorization
Difference between Authentication and Authorization in ASP.NET S.No 1 Authentication Meaning: Authentication is the process of verifying the identity of a user. Example: Suppose, we have 2 types of users ( normal and admins ) to a website. When the user tries to access the website, we ask them to log in. This is authentication part. Types of Authentication: Windows Authentication Forms Authentication Passport Authentication Whent it takes place ? Authentication always precedes to Authorization,event if our application lets anonymous users connect and use the application,it still authenticates them as anonymous. Authorization Meaning: Authorization is process of checking whether the user has access rights to the system. Example: Once we know the user is valid, then we determine to which pages the user has access to. Normal users should not be able to access admin pages. This is authorization part. Types of Authorization: ACL authorization (also known as file authorization) URL authorization Whent it takes place ? Authorization takes place after Authentication

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-authenticationand.html

EnableViewState vs ViewStateMode
Difference between EnableViewState and ViewStateMode properties S.No 1 EnableViewState EnableViewState exists from a long time ViewStateMode Property Introduction: ViewStateMode property is

introduced in ASP.NET 4 2 Available Values: EnableViewState property only accepts true or false values Default Value: True What EnableViewState does ? To enable ViewState at Page level How to use ? Using EnableViewState property we can have one of these 2 options. i. We can turn off view state altogether by setting its value to false in web.config file,or ii.Enable viewstate for the entire page and then turn it off on a control-by-control basis. Available Values: ViewStateMode property can have a value of - Enabled, Disabled and inherit. Default Value: Inherit What ViewStateMode does ? To enable ViewState at Control level How to use ? Steps involved to disable view state for a page and to enable it for a specific control on the page, i. Set the EnableViewState property of the page and the control to true, ii. Set the ViewStateMode property of the page to Disabled, and iii. Set the ViewStateMode property of the control to Enabled.

3 4

Summary: 1. If EnableViewState is to True, only then the ViewStateMode settings are applied. 2. In other words, if EnableViewState is set to False, ViewStateMode setting is not respected 3. Therefore, we have to use ViewStateMode property in conjunction with EnableViewState. Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-enableviewstateand.html

Grid Layout vs Form Layout


Difference between Grid Layout and Form Layout S.No 1 Grid Layout In Grid layout, controls are displayed in the grid format. Grid layout can be used for Microsoft Windowsstyle Flow Layout In Flow layout, controls are arranged in the order in which they are created. Flow layout can be used for document-style applications, in

applications, in which controls are not mixed with large amounts of text. 3 When we create controls with GridLayout, Visual Studio adds style attributes to each control that set the position of the control In Grid layout, if we look in to the HTML code created by absolute positioning we can notice only lots of DIV tags.So,pages using grid layout will not always display correctly in non-Microsoft browsers.

which text and controls are intermingled. When we create controls with FlowLayout, Visual Studio omits the style attribute.

In Flow layout ,we can see more of using HTML table to position elements which is compatible with wide range of browsers.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-grid-layout-andform.html

Difference between Synchronous and Asynchronous HTTP Handlers


Difference between Synchronous and Asynchronous HTTP Handlers S.No 1 Synchronous HTTP Handlers Asynchronous HTTP Handlers Meaning: A synchronous handler does not return until it finishes processing the HTTP request for which it is called. Which Interface to implement? IHttpHandler interface has to be implemented in oder to create a synchronous handler. Whent to use? Synchronous handlers are useful when we must start an application process that might not be lengthy and the user has to wait until it finishes before receiving a response from the server. Meaning: An asynchronous handler runs a process independently of sending a response to the user. Which Interface to implement: IHttpAsyncHandler interface has to be implemented in order to create an asynchronous handler. When to use? Asynchronous handlers are useful when we must start an application process that might be lengthy and the user does not have to wait until it finishes before receiving a response from the server.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-synchronousand.html

Difference between Asynchronous and Synchronous Postback


Difference between Asynchronous and Synchronous Postback S.No 1 Asynchronous Postback Asynchronous postback renders only the required part of the page Asynchronous postback executes only one postback at a time, that is, if we have two buttons doing asynchronous postback, the actions will be performed one by one. Asynchronous postback only modifies the update panel that raises the postback. Synchronous Postback Synchronous postback renders the entire page for any postback. Synchronous postback executes all the actions at once.

Synchronous postback modifies the entire page.

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-asynchronousand.html

Server.Transfer vs Cross-page Posting


Difference Between Server.Transfer and Cross-page Posting S.No 1 Server.Transfer Cross-page Posting

URL changes or not: URL changes or not: In Server.Transfer, the URL In cross page posting, the form is does not change . submitted to a different page, thereby it changes the url. Is it Client-based / Serverbased operation ? Server.Transfer method is a server-based operation. IsCrossPagePostBack property available or not: There is no such property available in Server.Transfer method. Is it Client-based / Server-based operation ? Cross-page postback is a clientbased transfer. IsCrossPagePostBack property available or not: It is easy to determine whether the page was invoked from a crosspage posting or a Server.Transfer operation, by checking the property named IsCrossPagePostBack of the Page class.

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-servertransferand.html

RDF vs OData vs GData


Difference between RDF, OData and GData RDF OData GData

Abbreviation: Abbreviation: Abbreviation: RDF stands for Resource OData stands for Open GData stands for Google Description Framework Data Protocol Data Protocol Meaning: RDF is a framework which follows W3C technology for representing information in the Web. The design of RDF is intended to meet the following goals: i.having a simple data model ii.having formal semantics and provable inference iii.using an extensible URI-based vocabulary iv.using an XML-based syntax v.supporting use of XML schema datatypes vi.allowing anyone to make statements about any resource It is used in Mozilla to integrate and aggregate Internet resources. Mozilla RDF was originally used to support the Aurora/Sidebar user interface and SmartBrowsing metadata services. It's main use in Mozilla now is as a common data model and API for use in XUL-based applications Meaning: The Open Data Protocol (OData) is an open web protocol for querying and updating data. The protocol allows for a consumer to query a datasource over the HTTP protocol and get the result back in formats like Atom, JSON or plain XML, including pagination, ordering or filtering of the data. Many of the building blocks that make up OData are standardized via Atom and AtomPub. The OData specification is available under the Microsoft Open Specification Promise (OSP). Microsoft has released an OData software development kit (SDK) consisting of libraries for .NET, PHP, Java, JavaScript, webOS, and the iPhone. Meaning: Gdata provides a simple protocol for reading and writing data on the Internet, designed by Google. GData combines common XML-based syndication formats (Atom and RSS) with a feedpublishing system based on the Atom Publishing Protocol, plus some extensions for handling queries. It relies on XML or JSON as a data format. Google provides GData client libraries for Java, JavaScript, .NET, PHP, Python, and Objective-C.

Logical Model: Graph/EAV.Technology grounding (esp OWL ) in Description Logic.[12, 13]. Open World Assumption [27]

Logical Model: Graph/EAV. AtomPub and EDM grounding in entity relationship modelling [11]. Closed World Assumption[28] view (?) but with OpenTypes and Dynamic Properties[29]

Logical Model: Unclear/Mixed whatever google logical Model is behind services, but transcoded and exposed as AtomPub/JSON. Data relations and graphs not controllable by API eg cannot define a link between data elements that doesnt already exist. GData is primarily a client API. Physical model: Google applications and services publishing data in AtomPub/JSON format, with Google Data Namespace[58] element.

Physical model: Not mandated, but probably backed by a triple store and serialised over Http to RDF/XML, Json,TTL, N3 or other format. RDBMS backing or proxying possible.

Physical model: Not mandated, but probably backed by existing RDBMS persistence [4 "Abstract Data Model"], or more precisely a nontriple store. (I have no evidence to support this, but the gist of docs and examples suggests it as a typical use case) and serialised over Http with Atom/JSON according to Entity Data Model (EDM) [6] and Conceptual Schema Definition Language (CSDL)[11] Intent: Data publishing and syndication : "There is a vast amount of data available today and data is now being collected and stored at a rate never seen before. Much, if not most, of this data however is locked into specific applications or formats and difficult to access or to integrate into new uses"

Intent: Data syndication and web level linking : "The goal of the W3C SWEO Linking Open Data community project is to extend the Web with a data commons by publishing various open data sets as RDF on the Web and by setting RDF links between data items from different data sources"

Intent: Google cloud data publishing [55] : "The Google Data Protocol provides a secure means for external developers to write new applications that let end users access and update the data stored by many Google products.External developers can use the Google Data Protocol directly, or they can use any of the supported programming languages provided by the client libraries"

Protocol,operations: http, content negotiation, RDF, REST-GET. Sparql 1.1 for update Openness/Extensibility: Any and all,create your own ontology/namespace/URI s with RDFS/OWL/SKOS/, large opensource tooling & community, multiple serialisation RDF/XML,JSON, N3, TTL,

Protocol,operations: Protocol,operations: http, content negotiation, http,REST (PUT/POST? AtomPub/JSON, REST- GET/PATCH/DELETE)[56] GET/PUT/POST/DELET E [9] Openness/Extensibility Openness/Extensibility: : Google applications and Any and all (with a services only. legacy Microsoft base), while reuse Microsoft classes and types,namespaces (EDM)[6] with Atom/JSON serialisation. Large microsoft tooling and integration with others following.[7,8] URI minting,dereferencing : Unclear whether concept URI and Location URI are distinguished in specification -values can certainly be Location URIs, and IDs can be URIs, but attribute properties arent dereferencible to Location URIs.Well specified URI conventions [21] Linking,matching, equivalence: Navigation properties link entity elements within a single OData materialisation -external linkage not possible. Dereferencable attribute properties not possible but proposed[10]. Namespace handling, vocabularies: Namespaces supported in EDM but unclear if possible to create and URI minting,dereferencing : Atom namespace. <link rel=self /> denotes URI of item. ETags also used for versioned updates. Google Data namespace for content Kinds.[59], no dereferencing.

URI minting,dereferencing : Create your own URIs and namespaces following guidelines (slash vs hash) [15,16] Subject, predicate and object URIs must be dereferencible, content negotiation expected. Separation of concept URI and location URI central.

Linking, matching, equivalence: External entities can inherently be directly linked by reference, and equivalence is possible with owl:sameAs, owl:seeAlso (and other equivalence assertions) Namespace handling, vocabularies: Declare namespaces as required when importing public or well known

Linking,matching, equivalence: URIS Not dereferencable, linkage outside of google not possible.

Namespace handling, vocabularies: AtomPub and Google Data namespace only.

ontologies/vocabularies, creating SPARQL queries, short hand URIs,create new as required for your own custom classes, instances.

use namespace,or if it can be backed with a custom class/property definition (ontology). $metadata seems to separate logically and physically type and service metadata from instance data ie oData doesnt eat its own dog food. Content negotiation: Client specifies or server fails, or default to Atom representation.[19]. Only XML serialisation for service metadata.[40]. New mime-types introduced. Content negotiation: Use alt query param (accept-header not used) [57]

Content negotiation: Client and server negotiate content to best determination.[17,18]

Query capability : Dereferencibility central principle to linked data, whether in document, local endpoint or federated. SPARQL [14] query language allows suitably equipped endpoints to service structured query requests and return serialised RDF, json, csv, html, Security, privacy, provenance: No additional specifications above that supplied in web/http architecture. CORS becoming popular as access filter method for cross-site syndication capability at client level. Server side access control. Standards for Provenance and privacy planned and under development[24]. W3C XG provenance group[25]

Query capability : Query capability : Proposed dereferencible Query URIs with special author,category,fields. $metadata path element allow type metadata to be retrieved [10]. Running a structured query against an OData service with something like SPARQL isnt possible. Security, privacy, provenance: No additional specifications above that mandated in http/atom/json.[23, 31] CORS use possible for cross site syndication. Dallas/Azure Datamarket for trusted commercial and premium public domain data.[26]

by

Security, privacy, provenance: Http wire protocols, but in addition authentication (OpenID) and authorization are required(OAuth). ClientLogin and AuthSub are deprecated. [60]. No provenance handling.

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-rdf-odata-andgdata.html

Static vs Non-static Members


Difference between Static Members and Non-static Members in Asp.Net S.No 1 Static Members Non-static Members

How they are binded ? How they are binded ? These members are binded to These members are binded to the the class definition itself. object defined for the class. When they are loaded ? These members will be loaded into memory when ever the class has been loaded . When they are loaded ? These members will be loaded into memory every time a new object is defined for the class.

Where they are referenced ? Where they are referenced ? These members are These members are referenced referenced with the class name with object definition only. only.

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-static-membersand.html

JQGrid vs FlexGrid vs DataTables


Difference between JQGrid,FlexGrid and DataTables (OR) Compare jQuery grid and table plugins

JQGrid Data format : JSON, XML Sorting: Server-side (SQL 'ORDER BY'). Multicolumn sorting supported. Pagination: JSON/XML (server-side) User/Auto resizing of

FlexGrid

DataTables

Data format : Data format : JSON, XML or existing Existing HTML data Sorting: Server-side Sorting: Client-side. Multicolumn sorting supported.

Pagination: Server-side

Pagination: Client-side resizing of

User/Auto resizing of User/Auto

columns: Both Supported. Users can choose to hide columns. Internationalization: Supported. JS file sizes (excluding jQuery) : 300kB (some of which can be discarded based on application) Advantages: Extensive API and documentation

columns: columns: User only. Users can Auto only choose to hide columns. Internationalization: Not supported. Internationalization: Supported.

JS file sizes (excluding JS file sizes (excluding jQuery) : jQuery) : 56kB 143kB

Advantages: Advantages: Versatile, can wrap Uses existing HTML around HTML or used structure to wrap around JSON/XML to populate grid Disadvantages: Disadvantages: Relatively little Requires all the relevant data documentation, most of to be marked up as HTML the functionality only works with JSON/XML option

Disadvantages: Requires processing on server-side

Summary: As with all applications, each variant is suitable for a different solution. The fact that there are over 50 table plugins for jQuery is testament to how people see the need for developing new alternatives. jQuery is a powerful tool, but its use must also be weighed together with how much data you use - while server-side sorting and searching is usually very powerful and fast, it's still a relatively expensive operation. Both jqGrid and DataTables have a lot of useful features (like grids withing grids, user-selectable rows and inline editing) with solid API documentation to support it. Flexgrid is good if you want something to work without too much hassles. Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-jqgridflexigridand.html

Var vs IEnumerable
Difference between Var and IEnumerable S.No 1 Var When to use ? Use Var type when we want to make a "custom" type on the fly. IEnumerable When to use ? Use IEnumerable when we already know the type of query result.

Good for: Var is also good for remote collection.

Good for: IEnumerable is good for in-memory collection.

IEnumerable Example MyDataContext dc = new MyDataContext (); IEnumerable<Employee> list = dc.Employees.Where(p => p.Name.StartsWith("S")); list = list.Take<Employee>(10);

Generated SQL statements of above query will be :


SELECT [t0].[EmpID], [t0].[EmpName], [t0].[Salary] FROM [Employee] AS [t0] WHERE [t0].[EmpName] LIKE @p0

Notice that in this query "top 10" is missing since IEnumerable filters records on client side Var Example MyDataContext dc = new MyDataContext (); var list = dc.Employees.Where(p => p.Name.StartsWith("S")); list = list.Take<Employee>(10);

Generated SQL statements of above query will be :


SELECT TOP 10 [t0].[EmpID], [t0].[EmpName], [t0].[Salary] FROM [Employee] AS [t0] WHERE [t0].[EmpName] LIKE @p0

Notice that in this query "top 10" is exist since var is a IQueryable type that executes query in SQL server with all filters.

IEnumerable Type
IEnumerable is a forward only collection and is useful when we already know the type of query result. In below query the result will be a list of employee that can be mapped (type cast) to employee table.
IEnumerable<tblEmployee> lst =(from e in tblEmployee

where e.City=="Delhi" select e); Reference: http://onlydifferencefaqs.blogspot.in/2012/09/var-vs-ienumerable.html

URL Rewriting vs ASP.NET Routing


Differences between IIS URL Rewriting and ASP.NET Routing S.No 1 URL Rewriting URL rewriting consists of certain regular expression patterns that match an ASP.NET Routing Meaning: ASP.NET routing extracts specific values from the URL, based on a

incoming request URL and forward the request to a mapped URL instead. For example, one might create a URL rewriting rule that forwards an incoming request for http://www.example.com/Produ cts/Beverages to another URL of http://www.example.com/Produ cts/Show.aspx?id=5 2 Does it alter the request / incoming URL ? URL rewriting alters the request URL and forwards it to another URL. When URL Rewriting is right choice ? IIS URL rewriting is a generic URL manipulation mechanism that addresses a multitude of scenarios. In particular, it can be used by Web developers as well as Web server/site administrators to enable clean URLs for existing Web applications without modifying the application code. For what type of application(s) URL Rewriting can be used ? The IIS URL Rewrite module can be used with any type of Web application, which includes ASP.NET, PHP, ASP, and static files. Does it extensible and customizable ? The URL Rewrite module is not extensible in its current version. What tasks it can perform ? In addition to rewriting, the URL Rewrite module can perform HTTP redirection, issue custom status codes,

pattern. These extracted values can be used to determine the handler that will handle the request. We can also use these patterns to generate a URL that will map to a specific handler.

Does it alter the request / incoming URL ? ASP.NET routing is different. It does not alter the incoming URL. When ASP.NET Routing is right choice ? ASP.NET routing is a solution that is optimized for ASP.NET, thus it may be preferable for Web developers who design their ASP.NET applications from the ground up and want to have a clean URL structure.

For what type of application(s) ASP.NET Routing can be used ? ASP.NET routing can be used only with .NET Framework-based Web applications.

Does it extensible and customizable ? ASP.NET routing is fully extensible and customizable. What tasks it can perform ? ASP.NET routing does not perform these tasks.

and abort requests. 7 Application Area: The IIS URL Rewrite module can make rewriting decisions based on domain names, HTTP headers, and server variables. IIS pipeline mode or Integrated pipeline mode ? The IIS URL Rewrite module works the same way regardless of whether integrated or classic IIS pipeline mode is used for the application pool. Application Area: By default, ASP.NET routing works only with URL paths and with the HTTP-Method header.

IIS pipeline mode or Integrated pipeline mode ? For ASP.NET routing, it is preferable to use integrated pipeline mode. ASP.NET routing can work in classic mode, but in that case the application URLs must include file name extensions or the application must be configured to use "*" handler mapping in IIS.

Summary: IIS Rewiting & ASP.NET Routing: "Either IIS URL rewriting or ASP.NET routing can be used to implement URL manipulation scenarios for your Web application. " - By Ruslan Yakushev Main advantage of ASP.NET Routing: "It keeps the request-resource resolution logic within your application, so it's very easy to add application-dependent logic when you need, and it eliminates the need to maintain synchronization between your application and a separate configuration resource. Routing works great with traditional webforms." - By Rex M Reference: http://onlydifferencefaqs.blogspot.in/2012/09/url-rewriting-vs-aspnet-routing.html

You might also like