SlideShare a Scribd company logo
www.w3asp.net
TOP 20 INTERVIEW
QUESTION AND ANSWERS
www.w3asp.net
1. What are namespaces, and how they are used?
Ans. Namespaces are used to organize classes within the .NET
Framework. They dictate the logical structure of the code. The .NET
Framework has namespaces defined for its many classes, such as
System.Xml—these are utilized via the using statement. Namespaces
are assigned to classes via the namespace keyword.
2. How can I run an application with and without
debugger?
Ans. To run the application with debugger, select Debug > Run or
press F5. To run the application without debugger, select Debug >
Run without debugger or press Ctrl+F5
www.w3asp.net
3. What are break points in context with the debugger?
Ans. A break point is the line of code at which you want your program
to be paused (when running in debugger mode) and see the runtime
values of different variables in the program. If the program control
ever reaches this line during the execution of the program, it pause
the execution and allows you to see and edit the values of the
variables of your program.
4. What base class do all Web Forms inherit from ?
Ans. System.Windows.Forms.Form
www.w3asp.net
5. What is a digital signature?
Ans. A digital signature is an electronic signature used to
verify/guarantee the identity of the individual who is sending the
message.
6. What is a IL?
Ans. (IL)Intermediate Language is also known as MSIL (Microsoft
Intermediate Language) or CIL (Common Intermediate Language).
All .NET source code is compiled to IL. This IL is then converted to
machine code at the point where the software is installed, or at run-
time by a Just-In- Time (JIT) compiler.
www.w3asp.net
7. How do I sign out in forms authentication?
Ans. FormsAuthentication.Signout ()
8. How you can disable session in Asp.net?
Ans. If we set session Mode=”off” in web.config file, session will be
disabled in the application. For this we need to configure web.config
in the following way:
<Configuration>
<sessionmode="off"/>
</configuration>
www.w3asp.net
9. What classes are needed to send e-mail from an
ASP.NET application?
Ans. The classes MailMessage and SmtpMail have to be used to send
email from an ASP.NET application. MailMessage and SmtpMail are
classes defined in the .NET Framework Class Library(s)
System.Web.Mail namespace.
10. How do you turn off cookies for one page in your
site?
Ans. Use the Cookie.Discard Property which Gets or Sets the discard
flag set by the server. When true, this property instructs the client
application not to save the Cookie on the hard disk when a session
ends.
www.w3asp.net
11. How is .NET able to support multiple languages?
Ans. A language should comply with the Common Language Runtime
(CLR) standard to become a .Net language. In .Net, code is compiled
to Microsoft Intermediate Language (MSIL). This is called as Managed
Code. This Managed code is run in .Net environment. So after
compilation to this IL the language is not a barrier. A code can call or
use a function written in another language.
12. How to access HTTP-Specific information from within
a class (.cs File)
Ans. Add reference to the System.Web assembly in your class and
use the Current property of the HttpContext object to access the
desired server variable. Like -
string value = (string)(HttpContext.Current.Session["someData"]);
www.w3asp.net
13. What are the various ways of securing a web site that
could prevent from unwanted uses?
Ans. 1 Authentication/Authorization
2 Encryption/Decryption
3 Maintaining web servers outside the corporate firewall.
14. What is the Garbage Collection in ASP.Net ?
Ans. GC is the process whereby the Common Language Runtime
(CLR) reclaims memory that is no longer in use—i.e., no longer
referenced by an active object. Objects on the heap are garbage
collected after the final reference to them is destroyed. The exact
moment of collection is determined by the CLR. Memory for stack
values is freed up immediately when the stack frame in which they
are declared ends—e.g., when a method returns.
www.w3asp.net
15. What is the state management? What is the use of
state management in ASP.Net ?
Ans. State management is nothing but maintaining the user
information on client side or sever side. There are two types of state
management -
1. Server side state management - Session, Application, Caching,
Profiles.
2. Client side state management - Query string, Hidden field,
Cookies, Viewstates.
16. What is a control?
Ans. A control is a component that provides user-interface (UI)
capabilities.
www.w3asp.net
17. What is the role of Global.asax file?
Ans. Stores Global information about the application.
18. What is the difference between ExecuteQuery() and
ExecuteNonQuery()?
Ans. ExecuteQuery : Executes SQL queries directly on the database.
It has two overlaoded method:
1. DataContext.ExecuteQuery(TResult)(String, Object[]) - Executes
SQL queries directly on the database and returns objects.
2. ExecuteQuery(Type, String, object[]) - Executes SQL queries
directly on the database.
ExecuteNonQuery : Use for data manipulation, such as Insert,
Update, Delete.
www.w3asp.net
19.Explain the types of errors.
Ans. Syntax Errors: These include misspelled or missing keywords, or
other mistakes relating to the syntax of the language.
Runtime Errors: These errors are caused by the code that appears
correct to the compiler, but that cannot run with certain values
Logic Errors: These are errors in which a program that works
correctly under some circumstances give unexpected or unwanted
results based on certain input.
20. What is the root namespace for all types?
Ans. System.
www.w3asp.net
FOR MORE VISIT: www.w3asp.net

More Related Content

PPTX
MULTI THREADING IN JAVA
DOCX
Dot Net Accenture
 
PDF
C# interview-questions
PDF
MS.Net Interview Questions - Simplified
PPTX
Top 20 c# interview Question and answers
PDF
Crud tutorial en
PDF
Angular - Chapter 4 - Data and Event Handling
PDF
Java data types, variables and jvm
MULTI THREADING IN JAVA
Dot Net Accenture
 
C# interview-questions
MS.Net Interview Questions - Simplified
Top 20 c# interview Question and answers
Crud tutorial en
Angular - Chapter 4 - Data and Event Handling
Java data types, variables and jvm

What's hot (20)

PPT
Angular Introduction By Surekha Gadkari
PPTX
C# 101: Intro to Programming with C#
PPTX
C# Access modifiers
PPTX
Operator Overloading & Function Overloading
PPT
Asp.net basic
PPTX
OOP interview questions & answers.
PDF
React Interview Questions and Answers | React Tutorial | React Redux Online T...
PDF
Exception handling in plsql
PPTX
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
PDF
Break, Continue and Pass in Python.pdf
PPT
Web engineering - MVC
PPTX
Reading and Writing Files
PPTX
PPTX
Visitor design patterns
PPSX
C# - Part 1
PDF
[External] 2021.12.15 ă‚łăƒłăƒ†ăƒŠç§»èĄŒăźć‰ă«çŸ„ăŁăŠăŠăăŸă„ă“ăš @ gcpug æč˜ć—
PPTX
C# classes objects
PPTX
Java arrays
PDF
Oracle Cloud Infrastructure2023ćčŽ2月ćșŠă‚”ăƒŒăƒ“ă‚čăƒ»ă‚ąăƒƒăƒ—ăƒ‡ăƒŒăƒˆ
PPTX
Multithreading in java
Angular Introduction By Surekha Gadkari
C# 101: Intro to Programming with C#
C# Access modifiers
Operator Overloading & Function Overloading
Asp.net basic
OOP interview questions & answers.
React Interview Questions and Answers | React Tutorial | React Redux Online T...
Exception handling in plsql
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
Break, Continue and Pass in Python.pdf
Web engineering - MVC
Reading and Writing Files
Visitor design patterns
C# - Part 1
[External] 2021.12.15 ă‚łăƒłăƒ†ăƒŠç§»èĄŒăźć‰ă«çŸ„ăŁăŠăŠăăŸă„ă“ăš @ gcpug æč˜ć—
C# classes objects
Java arrays
Oracle Cloud Infrastructure2023ćčŽ2月ćșŠă‚”ăƒŒăƒ“ă‚čăƒ»ă‚ąăƒƒăƒ—ăƒ‡ăƒŒăƒˆ
Multithreading in java
Ad

Viewers also liked (13)

PPTX
Interview Question and Answers: The internal interview top 10 tips
DOC
Dot net interview questions
PPTX
Interview questions on asp
PPTX
Top 15-asp-dot-net-interview-questions-and-answers
PPSX
HTML & XHTML Basics
PDF
Cts informatica interview question answers
PDF
DotNet &amp; Sql Server Interview Questions
DOCX
important DotNet Questions For Practicals And Interviews
PPTX
Interview question tips
PDF
Top 100 .Net Interview Questions and Answer
PDF
Accenture informatica interview question answers
PDF
Top 100 SQL Interview Questions and Answers
DOC
Sql queries with answers
Interview Question and Answers: The internal interview top 10 tips
Dot net interview questions
Interview questions on asp
Top 15-asp-dot-net-interview-questions-and-answers
HTML & XHTML Basics
Cts informatica interview question answers
DotNet &amp; Sql Server Interview Questions
important DotNet Questions For Practicals And Interviews
Interview question tips
Top 100 .Net Interview Questions and Answer
Accenture informatica interview question answers
Top 100 SQL Interview Questions and Answers
Sql queries with answers
Ad

Similar to Top 20 Asp.net interview Question and answers (20)

DOCX
Asp interview Question and Answer
 
DOCX
Latest .Net Questions and Answers
PDF
Asp.net+interview+questions+and+answers
PPTX
Asp.net
PPTX
NET_Training.pptx
PDF
Dot net interview questions and asnwers
ZIP
ASP.Net Presentation Part1
PDF
Top 10 - ASP.NET Interview Questions And Answers 2023.pdf
PPTX
ASP.NET Presentation
PDF
Asp net interview_questions
PDF
Asp net interview_questions
 
PDF
C sharp and asp.net interview questions
PPTX
Asp.net
PPTX
Top 15 asp dot net interview questions and answers
DOCX
PPTX
Developing an aspnet web application
PPT
How to develop asp web applications
PPT
Developing an ASP.NET Web Application
Asp interview Question and Answer
 
Latest .Net Questions and Answers
Asp.net+interview+questions+and+answers
Asp.net
NET_Training.pptx
Dot net interview questions and asnwers
ASP.Net Presentation Part1
Top 10 - ASP.NET Interview Questions And Answers 2023.pdf
ASP.NET Presentation
Asp net interview_questions
Asp net interview_questions
 
C sharp and asp.net interview questions
Asp.net
Top 15 asp dot net interview questions and answers
Developing an aspnet web application
How to develop asp web applications
Developing an ASP.NET Web Application

Recently uploaded (20)

PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
top salesforce developer skills in 2025.pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
medical staffing services at VALiNTRY
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
Transform Your Business with a Software ERP System
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
Essential Infomation Tech presentation.pptx
PDF
System and Network Administraation Chapter 3
PDF
AI in Product Development-omnex systems
PDF
Softaken Excel to vCard Converter Software.pdf
Navsoft: AI-Powered Business Solutions & Custom Software Development
top salesforce developer skills in 2025.pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 41
medical staffing services at VALiNTRY
wealthsignaloriginal-com-DS-text-... (1).pdf
Understanding Forklifts - TECH EHS Solution
CHAPTER 2 - PM Management and IT Context
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Transform Your Business with a Software ERP System
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Which alternative to Crystal Reports is best for small or large businesses.pdf
Wondershare Filmora 15 Crack With Activation Key [2025
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
How to Migrate SBCGlobal Email to Yahoo Easily
Essential Infomation Tech presentation.pptx
System and Network Administraation Chapter 3
AI in Product Development-omnex systems
Softaken Excel to vCard Converter Software.pdf

Top 20 Asp.net interview Question and answers

  • 2. www.w3asp.net 1. What are namespaces, and how they are used? Ans. Namespaces are used to organize classes within the .NET Framework. They dictate the logical structure of the code. The .NET Framework has namespaces defined for its many classes, such as System.Xml—these are utilized via the using statement. Namespaces are assigned to classes via the namespace keyword. 2. How can I run an application with and without debugger? Ans. To run the application with debugger, select Debug > Run or press F5. To run the application without debugger, select Debug > Run without debugger or press Ctrl+F5
  • 3. www.w3asp.net 3. What are break points in context with the debugger? Ans. A break point is the line of code at which you want your program to be paused (when running in debugger mode) and see the runtime values of different variables in the program. If the program control ever reaches this line during the execution of the program, it pause the execution and allows you to see and edit the values of the variables of your program. 4. What base class do all Web Forms inherit from ? Ans. System.Windows.Forms.Form
  • 4. www.w3asp.net 5. What is a digital signature? Ans. A digital signature is an electronic signature used to verify/guarantee the identity of the individual who is sending the message. 6. What is a IL? Ans. (IL)Intermediate Language is also known as MSIL (Microsoft Intermediate Language) or CIL (Common Intermediate Language). All .NET source code is compiled to IL. This IL is then converted to machine code at the point where the software is installed, or at run- time by a Just-In- Time (JIT) compiler.
  • 5. www.w3asp.net 7. How do I sign out in forms authentication? Ans. FormsAuthentication.Signout () 8. How you can disable session in Asp.net? Ans. If we set session Mode=”off” in web.config file, session will be disabled in the application. For this we need to configure web.config in the following way: <Configuration> <sessionmode="off"/> </configuration>
  • 6. www.w3asp.net 9. What classes are needed to send e-mail from an ASP.NET application? Ans. The classes MailMessage and SmtpMail have to be used to send email from an ASP.NET application. MailMessage and SmtpMail are classes defined in the .NET Framework Class Library(s) System.Web.Mail namespace. 10. How do you turn off cookies for one page in your site? Ans. Use the Cookie.Discard Property which Gets or Sets the discard flag set by the server. When true, this property instructs the client application not to save the Cookie on the hard disk when a session ends.
  • 7. www.w3asp.net 11. How is .NET able to support multiple languages? Ans. A language should comply with the Common Language Runtime (CLR) standard to become a .Net language. In .Net, code is compiled to Microsoft Intermediate Language (MSIL). This is called as Managed Code. This Managed code is run in .Net environment. So after compilation to this IL the language is not a barrier. A code can call or use a function written in another language. 12. How to access HTTP-Specific information from within a class (.cs File) Ans. Add reference to the System.Web assembly in your class and use the Current property of the HttpContext object to access the desired server variable. Like - string value = (string)(HttpContext.Current.Session["someData"]);
  • 8. www.w3asp.net 13. What are the various ways of securing a web site that could prevent from unwanted uses? Ans. 1 Authentication/Authorization 2 Encryption/Decryption 3 Maintaining web servers outside the corporate firewall. 14. What is the Garbage Collection in ASP.Net ? Ans. GC is the process whereby the Common Language Runtime (CLR) reclaims memory that is no longer in use—i.e., no longer referenced by an active object. Objects on the heap are garbage collected after the final reference to them is destroyed. The exact moment of collection is determined by the CLR. Memory for stack values is freed up immediately when the stack frame in which they are declared ends—e.g., when a method returns.
  • 9. www.w3asp.net 15. What is the state management? What is the use of state management in ASP.Net ? Ans. State management is nothing but maintaining the user information on client side or sever side. There are two types of state management - 1. Server side state management - Session, Application, Caching, Profiles. 2. Client side state management - Query string, Hidden field, Cookies, Viewstates. 16. What is a control? Ans. A control is a component that provides user-interface (UI) capabilities.
  • 10. www.w3asp.net 17. What is the role of Global.asax file? Ans. Stores Global information about the application. 18. What is the difference between ExecuteQuery() and ExecuteNonQuery()? Ans. ExecuteQuery : Executes SQL queries directly on the database. It has two overlaoded method: 1. DataContext.ExecuteQuery(TResult)(String, Object[]) - Executes SQL queries directly on the database and returns objects. 2. ExecuteQuery(Type, String, object[]) - Executes SQL queries directly on the database. ExecuteNonQuery : Use for data manipulation, such as Insert, Update, Delete.
  • 11. www.w3asp.net 19.Explain the types of errors. Ans. Syntax Errors: These include misspelled or missing keywords, or other mistakes relating to the syntax of the language. Runtime Errors: These errors are caused by the code that appears correct to the compiler, but that cannot run with certain values Logic Errors: These are errors in which a program that works correctly under some circumstances give unexpected or unwanted results based on certain input. 20. What is the root namespace for all types? Ans. System.