0% found this document useful (0 votes)
58 views

Answer

The document discusses several key differences and concepts between classic ASP and ASP.NET, including: - ASP is interpreted while ASP.NET is compiled. ASP.NET uses ADO.NET for databases while ASP uses ADO. - In ASP.NET, HTML and code are separated while in ASP they are mixed. ASP.NET is fully object-oriented while ASP is partially object-oriented. - ASP.NET has built-in XML support while ASP has no built-in XML support. An ASP.NET application can run without a web.config file by defaulting to settings in the machine.config file.

Uploaded by

Kristie Gray
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views

Answer

The document discusses several key differences and concepts between classic ASP and ASP.NET, including: - ASP is interpreted while ASP.NET is compiled. ASP.NET uses ADO.NET for databases while ASP uses ADO. - In ASP.NET, HTML and code are separated while in ASP they are mixed. ASP.NET is fully object-oriented while ASP is partially object-oriented. - ASP.NET has built-in XML support while ASP has no built-in XML support. An ASP.NET application can run without a web.config file by defaulting to settings in the machine.config file.

Uploaded by

Kristie Gray
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

What is the difference between asp and asp.

net

Answer: 1. ASP is interpreted, ASP.NET is compiled. 2. Classic ASP uses a technology called ADO to connect and work with databases. ASP.NET uses the ADO.NET technology 3. ASP has Mixed HTML and coding logic where in asp.net html and coding part are separated by code behind files. 4. ASP.NET purely object oriented whereas ASP is partially object oriented. 5. For ASP No in-built support for XML whereas in ASP.NET full XML Support for easy data exchange.

Can we run asp.net application without WEB.CONFIG file


Answer: Yes, we can run an asp.net application without the WEB.CONFIG file. It means that the default configuration will be loaded from MACHINE.CONFIG file.

Because all the configuration settings will be available under MACHINE.CONFIG file by default these settings will be applied to all asp.net applications. The MACHINE.CONFIG file will be automitacally loaded when .net framework is installed. it is something like if we had not defined the web.config the application will take the settings from the machine.config.the machine.config settings are overide by the web.config if u define the web.config for each running appln In 2005 The VS When we trying to run first time any application the 2005 VS gives us warning that want to run application without beb.config file.

What is scavenging in .net

Answer: When we implement the Caching concept in the application,all the cached items will be stored in the memory.When executing the application if memory resources are low,then all the cached items stored in the memory get remove from the caching.this concept is called Scavenging .

What is the difference between a strong and weak named assemblies?

Answer: 1. Weak named assemblies can be duplicated and tampered with, where as strong named assemblies cannot be tampered and duplicated. 2. Strong named assemblies can be copied into GAC(GLOBAL ASSEMBLY CACHE), where as weak named assemblies cannot be copied. 3. A single copy of strong named assembly present in the GAC(GLOBAL ASSEMBLY CACHE) can be shared with multiple applications, where as weak named assembly must be copied into the bin directory of each project.

What is view state in asp.net

Answer: Viewstate object is used to persist data of variables across postbacks. In ASP.NET, a variable's value is assigned to a viewstate object and then this is passed as a hidden variable and then may be retrieved by a page after a postback. See the example below...

//Save the value in ViewState object before the PostBack ViewState("SomeVar") = txtFirstName.text;

//Retrieve the value from ViewState object after the PostBack String strFirstName = ViewState("SomeVar").ToString();

Note that Viewstate object's value is accessible only at page level. This means that if a viewstate is created at page1.aspx, then it may be used only within page1.aspx after the postback, and cannot be used by any other page.

What is .net remoting


Answer: .NET Remoting is a mechanism for communicating between objects which are not in the same process. .NET remoting enables you to build widely distributed applications easily, whether application components are all on one computer or spread out across the entire world. It provides a number of services, including activation and lifetime support, as well as communication channels responsible for transporting messages to and from remote applications.

Where is the default Session data is stored in ASP.Net?


Select from following answers: 1. Session Object 2. StateServer 3. InProcess 4. None of the above

In-process mode is the default session state mode and is specified using the InProc SessionStateMode enumeration value. In-process mode stores session state values and variables in memory on the local Web server. It is the only mode that supports the Session_OnEnd event.string for a pages URL.

Why is the "new" keyword used for instantiating an object in .Net ?

Answer: The "new" keyword instructs the compiler to instantiate a new object, with appropriate number of bytes depending upon the type of the object and gather required memory

from the heap. Example:-

Classname objectname = new

Classname();

How do you customize an ASP.Net page so that it will use a custom browser configuration instead of the default browser capabilities object?
Answer: Configure the ClientTarget property to point to a browser alias value defined in the application web config file.

Q.) Can you write ASP in different languages? A.) Yes you can, but it's not recommended. You can write ASP in JavaScript and a few other languages, but the vast majority of the time you will use VBScript. ASP vs ASP.NET differences ===================== - .NET uses a CLR much like the Java JRE. This means you can use a ton of different languages to write a .NET app. - .NET uses ADO.NET where as ASP uses ADO. You can still call .NET components using VBScript but it's not recommended. - .NET is much more scalable than classic ASP. - .NET can use OO languages where as you kind of have to rig OO concepts in ASP. - The .NET framework is much more robust that classic ASP. Meaning with ASP you have to build a lot of functionality yourself, where in .NET the functionality is already there for you. - ASP is a variant type language where .NET isn't (for the most part). - .NET has much better support for web services, SOAP and what not. - .NET has a lot of form controls which you can't enjoy with classic ASP. - .NET pages can be compiled where as ASP uses JIT compiling.

There are a lot of other differences. Some friendly advice from a classic ASP developer is to forget about ASP and learn .NET. .NET is much more in demand. The only thing VBScript is used for is writing DTS packages on old version of MS SQL server or for windows scripting.

Asp.Net Interview Question Part 1


By Shivprasad koirala, 27 Aug 2008 3.78 (28 votes)
Collapse | Copy Code

Title: Author: Email: Language: Level: Description:

ASP.NET Shivprasad Koirala shiv_koirala@yahoo.com ASP.NET Beginner .Net Interview Questions 4th Edition

ASP. NET
(B) What is the sequence in which ASP.NET events are processed? (B) In which event are the controls fully loaded? (B) How does ASP.NET maintain state in between subsequent request? (A) What is event bubbling? (B) How do we assign page specific attributes? (A) How do we ensure view state is not tampered? (B) What is the use of @ Register directives? (B) What is the use of Smart Navigation property? (B) What is AppSetting Section in Web.Config file? (B) Where is View State information stored? (I) what is the use of @ Output Cache directive in ASP.NET. (B) How can we create custom controls in ASP.NET? (B) How many types of validation controls are provided by ASP.NET? (B) Can you explain AutoPostBack?

(B) How can you enable automatic paging in Data Grid? (B) What is the use of GLOBAL.ASAX file? (B) What is the difference between Web.config and Machine.Config? (B) What is a SESSION and APPLICATION object? Introduction In this section we will touch base on one of important concepts in ASP. Net. You can download my .NET Interview Question PDF from http://www.questpond.com/SampleDotNetInterviewQuestionBook.zip . I have also put all these design patterns in a video format and uploaded onhttp://www.questpond.com/FreeDesign1.htm . You can visit http://www.questpond.com and download the complete architecture interview questions PDF which covers SOA , UML , Design patterns , Togaf , OOPs etc. You can download the software architecture interview questions PDF Download Software Architecture Interview Questions Previous parts of my Interview questions series for Architects Part 1 - SoftArchInter1.aspx Part 2 - SoftArch2.aspx Part 3 - SoftArch3.aspx Part 4 - SoftArch4.aspx UML interview questions part 1 SoftArch5.aspx Happy job hunting......

(B) What is the sequence in which ASP.NET events are processed?


Following is the sequence in which the events occur: Page_Init. Page Load. Control events Page- Unload event. Page_init event only occurs when first time the page is started, but Page Load occurs in subsequent request of the page.

(B) In which event are the controls fully loaded?

Page load event guarantees that all controls are fully loaded. Controls are also accessed in Page_Init events but you will see that view state is not fully loaded during this event.5 (B) How can we identify that the Page is Post Back? Page object has an IsPostBack property, which can be checked to know that is the page posted back.

(B) How does ASP.NET maintain state in between subsequent request?


Refer caching chapter.

(A) What is event bubbling?


Server controls like Data grid, Data List, and Repeater can have other child controls inside them. Example Data Grid can have combo box inside data grid. These child control do not raise there events by themselves, rather they pass the event to the container parent (which can be a data grid, data list, repeater), which passed to the page as ItemCommand event. As the child control send events to parent it is termed as event bubbling.

(B) How do we assign page specific attributes?


Page attributes are specified using the @Page directive.

(A) How do we ensure view state is not tampered?


Using the @Page directive and setting EnableViewStateMac property to True.

(B) What is the use of @ Register directives?


@Register directive informs the compiler of any custom server control added to the page.

(B) What is the use of Smart Navigation property?


Its a feature provided by ASP. NET to prevent flickering and redrawing when the page is posted back. Note:- This is only supported for IE browser. Project is who have browser compatibility as requirements have to think some other ways of avoiding flickering.

(B) What is AppSetting Section in Web.Config file?

Web.config file defines configuration for a web project. Using AppSetting section, we can define user-defined values. Example below defined is Connection String section, which will be used through out the project for database connection. <Configuration> <appSettings> <add key="ConnectionString" value="server=xyz;pwd=www;database=testing" /> </appSettings>

(B) Where is View State information stored?


In HTML Hidden Fields.

(I) what is the use of @ Output Cache directive in ASP.NET.


It is used for caching. See more for Caching chapter.

(B) How can we create custom controls in ASP.NET?


User controls are created using .ASCX in ASP.NET. After .ASCX file is created you need to two things in order that the ASCX can be used in project:.

Register the ASCX control in page using the <percentage@ Register directive.Example

<%@ Register tag prefix="Accounting" Tag name="footer" Src="Footer.ascx" %>

Now to use the above accounting footer in page you can use the below directive.

<Accounting: footer runat="server" />

(B) How many types of validation controls are provided by ASP.NET?


There are six main types of validation controls:RequiredFieldValidator It checks whether the control have any value. It is used when you want the control should not be empty.

RangeValidator It checks if the value in validated control is in that specific range. Example TxtCustomerCode should not be more than eight lengths. CompareValidator It checks that the value in controls should match some specific value. Example Textbox TxtPie should be equal to 3.14. RegularExpressionValidator When we want the control, value should match with a specific regular expression. CustomValidator It is used to define User Defined validation. Validation Summary It displays summary of all current validation errors on an ASP.NET page. Note: - It is rare that some one will ask step by step all the validation controls. Rather they will ask for what type of validation which validator will be used. Example in one of the interviews i was asked how will you display summary of all errors in the validation control...just uttered one word Validation summary.

(B) Can you explain AutoPostBack?


If we want the control to automatically post back in case of any event, we will need to check this attribute as true. Example on a Combo Box change we need to send the event immediately to the server side then set the AutoPostBack attribute to true.

(B) How can you enable automatic paging in Data Grid?


Following are the points to be done in order to enable paging in Data grid: Set the Allow Paging to true. In PageIndexChanged event set the current page index clicked. Note: - The answers are very short, if you have implemented practically its just a revision. If you are fresher, just make sample code using Datagrid and try to implement this functionality.

(B) What is the use of GLOBAL.ASAX file?


It allows to execute ASP.NET application level events and setting application-level variables.

(B) What is the difference between Web.config and Machine.Config?

Web.config files apply settings to each web application, while Machine.config file apply settings to all ASP.NET applications.

(B) What is a SESSION and APPLICATION object?


Session object store information between HTTP requests for a particular user, while application object are global across users.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy