8.08.2012

ASP.NET Difference FAQs-7

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

2.Difference between ASP and ASPX
S.No
ASP
ASPX
1
The .asp is the file extension of the classic ASP page.
The .aspx is the file extension of ASP.NET page.
2
ASP stands for Active Server Pages.
ASPX is the acronym of Active Server Pages Extended.
3
The .asp file runs under the process space of inetinfo.exe, which is an IIS process space.
The .aspx file runs in a separate worker process called as aspnet_wp.exe.
4
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.
5
The .asp file can be coded in only two languages namely VBScript and Javascript. Both these languages are client side languages.
The .aspx file can be coded using any .NET language including VB.NET, C#. Both VB.NET and C# are Server Side 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.
7
In .asp file, a function can be defined inside server side script tags.
In .aspx file, a function cannot be defined inside server side script tags.
8
In .asp file, all the directives will be placed in the page’s 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
Thread
Process
1
Threads share the address space of the process that created it.
Processes have their own address.
2
Threads have direct access to the data segment of its process
Processes have their own copy of the data segment of the parent process.
3
Threads can directly communicate with other threads of its process
Processes must use interprocess communication to communicate with sibling processes.
4
Threads have almost no overhead
Processes have considerable overhead
5
New threads are easily created
New processes require duplication of the parent process.
6
Threads can exercise considerable control over threads of the same process
Processes can only exercise control over
child processes
7
Changes to the main thread (cancellation, priority change, etc.) may affect the behavior of the other threads of the process
Changes to the parent process does not
affect child processes.


Another good reference:


4.Difference between ASPX and ASCX
S.No
ASPX
ASCX
1
ASP.NET Page uses the extension .aspx
For eg: Default.aspx
User Control uses the extension .ascx
For eg: WebUserControl.ascx.
2
ASP.NET Page begin with a Page Directive.
For eg:
<%@ Page Language="C#"
AutoEventWireup="true"
CodeFile="Default.aspx.cs"
Inherits="_Default" %>

User Control begin with a Control Directive.
For eg:
<%@ Control Language="C#"
AutoEventWireup="true"
CodeFile="WebUserControl.ascx.cs"
Inherits="WebUserControl" %>

3
Usercontrol code can be used in webforms
We can not use webforms in usercontrol.

4
ASP.NET Page can be viewed directly in the Browser.

User Control cannot be viewed directly in the browser. User Controls are added to WebPages and we view them by requesting a web page in our browser
5
ASP.NET page has HTML, Body or Form element.
User Control does not have a HTML, Body or Form element.

6 comments:

  1. I am glad to be a visitor of this perfect web blog, thanks for this rare info regarding DOT NET Development Services.

    Hire C# Developers

    ReplyDelete
  2. Thanks Andrew.Your feedback will really help me to make this blog to look better.

    ReplyDelete
  3. Really a informative blog..thankx for sharing :)

    ReplyDelete
  4. Thanks Nancy for your encouraging words.I am really happy to see visitors from different countries around the globe now a days.Thanks once again for your arrival.

    ReplyDelete