1.What is .NET Framework?
Ans: .NET Framework is a common environment for building, deploying, and running Web applications and Web Services.
The .NET Framework has two main components: the common language runtime and the .NET Framework class library.
common language runtime(CLR)
CLR takes care of code management at program execution and provides various beneficial services such as memory management, thread management, security management, code verification, compilation, and other system services.
Class Library
Comprehensive object-oriented collection of reusable types that can be assembled to build a wide range of applications and services
2.What is Serialization
Ans: It is the process of saving the state of an object by converting it to a stream of bytes. The object can then be persisted to file, database, or even memory.
Purpose: The purpose of the serialization is to save the state of an object in order to have the ability to recreate the same object when required. It is an important to let the user save work and then be able to continue from that point at a later time. Used to creating a clone of an object
3. What is Assembly?
a. Assemblies are the building blocks of .NET Framework applications
b. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality.
i.What are the contents of assembly?
In general, a static assembly can consist of four elements:
· The assembly manifest, which contains assembly metadata.
· Type metadata.
· Microsoft intermediate language (MSIL) code that implements the types.
· A set of resources.
ii. What are the different types of assemblies?
Ans:Private, Public/Shared, Satellite
4. Which namespace is the base class for .net Class library?
Ans: system.object
5. What is Garbage Collection in .Net? Garbage collection process?
Garbage collection is the process of detecting when objects are no longer in use and automatically destroying those objects, thus freeing memory.
Garbage collection does not happen immediately, but instead the garbage collector will occasionally make a sweep of the heap to determine which objects should be allocated for destruction
6. What is Remoting?
The process of communication between different operating system processes, regardless of whether they are on the same computer. The .NET remoting system is an architecture designed to simplify communication between objects living in different application domains, whether on the same computer or not, and between different contexts, whether in the same application domain or not.
7.What is Webservices?
Web Services are applications delivered as a service on the Web. Web services allow for programmatic access of business logic over the Web
ASP.Net with VB.Net 1.Where does the Web page belong in the .NET Framework class hierarchy?
Ans: System.Web.UI.Page
2.What’s the difference between Response.Write() and Response.Output.Write()?
Ans: The latter one allows you to write formattedoutput
3.What data type does the RangeValidator control support?
Ans: Integer,String and Date.
4.Explain the differences between Server-side and Client-side code?
Ans: Server-side code runs on the server. Client-side code runs in the clients’ browser.
5.What type of code (server or client) is found in a Code-Behind class?
Ans: Server-side code.
6.Should validation (did the user enter a real date) occur server-side or client-side? Why?
Ans:Client-side. This reduces an additional request to the server to validate the users input.
7.What is the difference between Server.Transfer and Response.Redirect?
Ans:Server.Transfer is used to post a form to another page. Response.Redirect is used to redirect the user to another page or site.
8.Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?
Ans:
i. A DataSet can represent an entire relational database in memory, complete with tables, relations, and views.
ii· A DataSet is designed to work without any continuing connection to the original data source.
iii· Data in a DataSet is bulk-loaded, rather than being loaded on demand.
iv· There's no concept of cursor types in a DataSet.
v· DataSets have no current record pointer You can use For Each loops to move through the data.
vi· You can store many edits in a DataSet, and write them to the original data source in a single operation.
vii· Though the DataSet is universal, other objects in ADO.NET come in different versions for different data sources.
9.Describe the difference between inline and code behind.Ans:Inline code written along side the html in a page. Code-behind is code written in a separate file and referenced by the .aspx page
10.Which method do you invoke on the DataAdapter control to load your generated dataset with data?
Ans:The .Fill() method
11.Name two properties common in every validation control?
Ans:ControlToValidate property and Text property
Question on ASP.Net with C#
- How big is the datatype int in .NET?
Ans: 32 bits.
- How big is the char?
Ans:16 bits (Unicode).
- Explain encapsulation.
Ans:The implementation is hidden, the interface is exposed.
- Where are the value-type variables allocated in the computer RAM?
Ans.Stack.
- How do you convert a string into an integer in .NET?
Ans.Int32.Parse(string), Convert.ToInt32()
- Is goto statement supported in C#? How about Java?
Ans:Gotos are supported in C# to the fullest. In Java goto is a reserved keyword that provides absolutely no functionality.
Name any 2 of the 4 .NET authentification methods
Ans:
i. Windows: Basic, digest, or Integrated Windows Authentication (NTLM or Kerberos).
ii.Microsoft Passport authentication
iii.Forms authentication
iv.Client Certificate authentication
- What is main difference between Global.asax and Web.Config?
Ans:
Global.asax
i.ASP.NET uses the global.asax to establish any global objects that your Web application uses
ii.The .asax extension denotes an application file rather than .aspx for a page file.
iii.Each ASP.NET application can contain at most one global.asax file
Web.Config
i.The web.config is an XML-formatted text file that resides in the Web site’s root directory.
ii.Through Web.config you can specify settings like custom 404 error pages, authentication and authorization settings for the Web site, compilation options for the ASP.NET Web pages, if tracing should be enabled, etc.
3. can specify application-wide settings in the web.config file
9.What are the access-specifiers available in c#?
Ans: Private, Protected, Public, Internal, Protected Internal.
Ans:Method overloading occurs when a class contains two methods with the same name, but different signatures