SlideShare a Scribd company logo
Top 15 ASP.Net Interview
Questions and Answers
CRB Tech reviews compiles some important interview questions
keeping your interest in concern. Hope this helps you in cracking your
interviews.
ASP.NET is the new ASP generation. It is does not fit with Classic ASP
ASP.NET pages have the .aspx extension
When a browser requests an ASP.NET file, the ASP.NET engine reads
the file, compiles and executes the words in the file, and returns the
result to the browser as plain HTML.
ASP.NET is a development frame for building web pages and web sites
with HTML, CSS, JavaScript and server scripting.
1. What is ASP?
Active Server Pages is a Microsoft’s server-side technology, which helps
in developing dynamic and user-friendly Web pages.
2. Define ASP.Net.
It is a development framework for building web pages and web sites with
HTML, CSS, JavaScript and server scripting.
3. ASP.net advantages?
ASP.Net advantage over ASP :
Compiled Code
Language Support
Strict Coding needs
Event-Driven Programming Model
3rd Party Controls
User Authentication
Easier Configuration & Deployment
Object and Page Caching
Higher Scalability
4. How to maintain session in ASP.NET?
In-process storage.
Session State Service.
Microsoft SQL Server.
In-Process Storage
The default location is the ASP.NET process itself.
Session State Service
It is an alternative to using in-process storage for session state. ASP.NET
provides the ASP.NET State Service. The State Service gives you an
alternative for storing session state that is not tied quite so closely to
ASP. Net’s own process.
Microsoft SQL Server
It is the final choice for storing state information.
5. What is the difference between Server.Transfer and Response.Redirect?
Server.Transfer() : The client sees it as on the requesting page , but all the
content is of the requested page.
Response.Dedirect() : Here the client know the physical location (page name
and query string as well).
6. Types of comments in asp.net
Single line comments
// for single line comments
Multiple line comments
/* for multi line comments */
XML tags comments
/// XML tags depicted in a code comment
7. Use of @RenderPage() method
@RenderPage() method is used to bring content from separate files.
Example:
<html>
<body>
@RenderPage(“header.cshtml”)
<h1>Hello Web Pages</h1>
<p>This is a paragraph</p>
@RenderPage(“footer.cshtml”)
</body>
</html>
8.What is the folder structure of ASP.NET Web Pages
Logical Folder Structure
Below is a basic folder structure for an ASP.NET web page:
Folders
The “Account” folder has log on and security files
The “App_Data” folder has databases and data files
The “Images” folder has images
The “Scripts” folder has browser scripts
The “Shared” folder has common files
Physical folder structure
Below is a basic folder structure for image
C:userDocumentsMyWebSitesDemoImages
From the example above:
The virtual name of a web picture might be “Images/pic31.jpg”.
But the physical name is
“C:usereDocumentsMyWebSitesDemoImagespic31.jpg”
URLs and Paths
URLs are to access files from the web:
http://www.demo.com/html/html5_intro.asp %>
9. Difference between globalization and localization
Globalization is the process of creating a software product that functions
in multiple locales.
Localization is the way of adapting a globalized application, which you
have already processed in a localized way, to a particular locale.
10. Define ViewState.
It is the method that the ASP.NET page frame utilize to preserve page
and control values between
round trips. When the HTML markup for the page is given, the current
state of the page and values that
must be kept during post back are arranged into base64-encoded
strings.
11. Name the methods used to force all the validation controls to
run
Page.Validate() method
12. What is the difference between Response.Write() and
Response.Output.Write() methods?
Response.write() doesn’t give output in format. The latter one helps you
to give output in format
Response.write – it writes the text stream , whereas
Response.output.write – it writes the HTTP Output Stream.
13. Define Cookie
A cookie is used to identify a user. It is a small file that the server
implants on the user’s computer. Each time the same PC requests a
page with a browser, it will send the cookie also. With ASP, one can both
create and retrieve cookie values.
14. How to Create a Cookie?
The “Response.Cookies” is used to create cookies.
N.B. The command Response.Cookies must appear BEFORE the
<html> tag.
In the below example, we are creating a cookie named “fname” and give
it the value “ABC” :
<%
Response.Cookies(“fname”)=”ABC”
Response.Cookies(“fname”).Expires=#Jan 10,2015#
15. How to recover a Cookie Value?
The command “Request.Cookies” is used to recover a cookie value.
Example:
<%
firstname=Request.Cookies(“fname”)
response.write(“Firstname=” & firstname)
%>
More questions would be coming next.
We are updating our list of question and answers on .NET
Stay connected to this page of CRB Tech reviews for more technical up-
gradation and other resources.
CRB Tech reviews will continue to enlighten you with such technical
articles on .NET.
Thank You....

More Related Content

What's hot (20)

PPTX
1. java database connectivity (jdbc)
Fad Zulkifli
 
PPTX
Session And Cookies In Servlets - Java
JainamParikh3
 
PDF
Introduction to Node.js Platform
Naresh Chintalcheru
 
PDF
Getting started with entity framework 6 code first using mvc 5
Ehtsham Khan
 
PPTX
Late Bound, Early Bound with Demo and Practical in Dynamics 365 Plugin
Sanjaya Prakash Pradhan
 
PPT
Entity Framework Overview
ukdpe
 
PPTX
Storage in the Windows Azure Platform - ericnel
ukdpe
 
PPTX
Test Data Builder Pattern
Alan Parkinson
 
PDF
Asp
Adil Jafri
 
PPTX
Web components
Mohd Saeed
 
PDF
Suggest.js
Mohd Saeed
 
PPTX
Servlets
Akshay Ballarpure
 
PPTX
JS basics
Mohd Saeed
 
PPT
java jdbc connection
Waheed Warraich
 
PDF
Lab work servlets and jsp
Rajiv Gupta
 
PPTX
Workshop Intro: FrontEnd General Overview
Visual Engineering
 
PDF
JSP Technology I
People Strategists
 
PDF
Progressive EPiServer Development
joelabrahamsson
 
PPTX
ASP.NET MVC Performance
rudib
 
1. java database connectivity (jdbc)
Fad Zulkifli
 
Session And Cookies In Servlets - Java
JainamParikh3
 
Introduction to Node.js Platform
Naresh Chintalcheru
 
Getting started with entity framework 6 code first using mvc 5
Ehtsham Khan
 
Late Bound, Early Bound with Demo and Practical in Dynamics 365 Plugin
Sanjaya Prakash Pradhan
 
Entity Framework Overview
ukdpe
 
Storage in the Windows Azure Platform - ericnel
ukdpe
 
Test Data Builder Pattern
Alan Parkinson
 
Web components
Mohd Saeed
 
Suggest.js
Mohd Saeed
 
JS basics
Mohd Saeed
 
java jdbc connection
Waheed Warraich
 
Lab work servlets and jsp
Rajiv Gupta
 
Workshop Intro: FrontEnd General Overview
Visual Engineering
 
JSP Technology I
People Strategists
 
Progressive EPiServer Development
joelabrahamsson
 
ASP.NET MVC Performance
rudib
 

Viewers also liked (14)

DOCX
important DotNet Questions For Practicals And Interviews
Rahul Jain
 
PDF
Dot net interview_questions
Jayesh Kheradia
 
PPT
Dot Net Interview Questions - Part 1
ReKruiTIn.com
 
DOCX
C# interview quesions
Shashwat Shriparv
 
PPTX
Top 20 Asp.net interview Question and answers
w3asp dotnet
 
PPSX
HTML & XHTML Basics
Hossein Zahed
 
PPTX
Top 20 c# interview Question and answers
w3asp dotnet
 
PDF
Cts informatica interview question answers
Sweta Singh
 
PDF
DotNet &amp; Sql Server Interview Questions
Neeraj Kaushik
 
PDF
Top 100 .Net Interview Questions and Answer
Vineet Kumar Saini
 
PPT
Yash technologies interview questions and answers
GarySpeed1234
 
PDF
Accenture informatica interview question answers
Sweta Singh
 
PDF
Top 100 SQL Interview Questions and Answers
iimjobs and hirist
 
DOC
Sql queries with answers
vijaybusu
 
important DotNet Questions For Practicals And Interviews
Rahul Jain
 
Dot net interview_questions
Jayesh Kheradia
 
Dot Net Interview Questions - Part 1
ReKruiTIn.com
 
C# interview quesions
Shashwat Shriparv
 
Top 20 Asp.net interview Question and answers
w3asp dotnet
 
HTML & XHTML Basics
Hossein Zahed
 
Top 20 c# interview Question and answers
w3asp dotnet
 
Cts informatica interview question answers
Sweta Singh
 
DotNet &amp; Sql Server Interview Questions
Neeraj Kaushik
 
Top 100 .Net Interview Questions and Answer
Vineet Kumar Saini
 
Yash technologies interview questions and answers
GarySpeed1234
 
Accenture informatica interview question answers
Sweta Singh
 
Top 100 SQL Interview Questions and Answers
iimjobs and hirist
 
Sql queries with answers
vijaybusu
 
Ad

Similar to Top 15-asp-dot-net-interview-questions-and-answers (20)

DOCX
Asp interview Question and Answer
home
 
PPTX
NET_Training.pptx
ssuserc28c7c1
 
PDF
C sharp and asp.net interview questions
Akhil Mittal
 
PDF
Asp net interview_questions
Ghazi Anwar
 
PDF
Asp net interview_questions
Bilam
 
PPTX
ASP.NET Lecture 2
Julie Iskander
 
PDF
Introductionto asp net-ppt
tmasyam
 
PPTX
ASP.NET Lecture 1
Julie Iskander
 
PPTX
Introduction to asp.net
Melick Baranasooriya
 
PDF
Dot net interview questions and asnwers
kavinilavuG
 
DOCX
Indows soft solutions technical interview questions for 1 year experienced in...
Indows Soft Solutions
 
DOCX
Indows soft solutions technical interview questions for 1 year experience in ...
Indows Soft Solutions
 
PDF
Top 10 - ASP.NET Interview Questions And Answers 2023.pdf
Ruddarpratap
 
PPT
Asp dot net long
Amelina Ahmeti
 
PPTX
Introduction to ASP.NET
Peter Gfader
 
PPTX
Chapter 8 part1
application developer
 
PPTX
Ch05 state management
Madhuri Kavade
 
Asp interview Question and Answer
home
 
NET_Training.pptx
ssuserc28c7c1
 
C sharp and asp.net interview questions
Akhil Mittal
 
Asp net interview_questions
Ghazi Anwar
 
Asp net interview_questions
Bilam
 
ASP.NET Lecture 2
Julie Iskander
 
Introductionto asp net-ppt
tmasyam
 
ASP.NET Lecture 1
Julie Iskander
 
Introduction to asp.net
Melick Baranasooriya
 
Dot net interview questions and asnwers
kavinilavuG
 
Indows soft solutions technical interview questions for 1 year experienced in...
Indows Soft Solutions
 
Indows soft solutions technical interview questions for 1 year experience in ...
Indows Soft Solutions
 
Top 10 - ASP.NET Interview Questions And Answers 2023.pdf
Ruddarpratap
 
Asp dot net long
Amelina Ahmeti
 
Introduction to ASP.NET
Peter Gfader
 
Chapter 8 part1
application developer
 
Ch05 state management
Madhuri Kavade
 
Ad

More from sonia merchant (20)

PPT
What does dot net hold for 2016?
sonia merchant
 
PDF
What does .net hold for 2016?
sonia merchant
 
PDF
Data protection api's in asp dot net
sonia merchant
 
PDF
Authorization p iv
sonia merchant
 
PDF
Authorization iii
sonia merchant
 
PDF
Authorization in asp dot net part 2
sonia merchant
 
PDF
Asp dot-net core problems and fixes
sonia merchant
 
PPTX
Search page-with-elasticsearch-and-dot-net
sonia merchant
 
PPTX
Build a-search-page-with-elastic search-and-dot-net
sonia merchant
 
PDF
How to optimize asp dot-net application
sonia merchant
 
PPT
How to optimize asp dot net application ?
sonia merchant
 
PDF
10 things to remember
sonia merchant
 
PPT
Learn dot net attributes
sonia merchant
 
PDF
Learn about dot net attributes
sonia merchant
 
PPTX
Owin and-katana-overview
sonia merchant
 
PPT
Next generation asp.net v next
sonia merchant
 
PPT
Dot net universal apps
sonia merchant
 
PDF
Browser frame building with c# and vb dot net
sonia merchant
 
PPTX
A simplest-way-to-reconstruct-.net-framework
sonia merchant
 
PDF
Silverlight versions-features
sonia merchant
 
What does dot net hold for 2016?
sonia merchant
 
What does .net hold for 2016?
sonia merchant
 
Data protection api's in asp dot net
sonia merchant
 
Authorization p iv
sonia merchant
 
Authorization iii
sonia merchant
 
Authorization in asp dot net part 2
sonia merchant
 
Asp dot-net core problems and fixes
sonia merchant
 
Search page-with-elasticsearch-and-dot-net
sonia merchant
 
Build a-search-page-with-elastic search-and-dot-net
sonia merchant
 
How to optimize asp dot-net application
sonia merchant
 
How to optimize asp dot net application ?
sonia merchant
 
10 things to remember
sonia merchant
 
Learn dot net attributes
sonia merchant
 
Learn about dot net attributes
sonia merchant
 
Owin and-katana-overview
sonia merchant
 
Next generation asp.net v next
sonia merchant
 
Dot net universal apps
sonia merchant
 
Browser frame building with c# and vb dot net
sonia merchant
 
A simplest-way-to-reconstruct-.net-framework
sonia merchant
 
Silverlight versions-features
sonia merchant
 

Recently uploaded (20)

PPTX
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
PPT
Electrical Safety Presentation for Basics Learning
AliJaved79382
 
PPTX
Mechanical Design of shell and tube heat exchangers as per ASME Sec VIII Divi...
shahveer210504
 
PDF
Zilliz Cloud Demo for performance and scale
Zilliz
 
PPTX
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
PDF
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
PPT
Carmon_Remote Sensing GIS by Mahesh kumar
DhananjayM6
 
PPTX
Arduino Based Gas Leakage Detector Project
CircuitDigest
 
PPTX
What is Shot Peening | Shot Peening is a Surface Treatment Process
Vibra Finish
 
PPTX
DATA BASE MANAGEMENT AND RELATIONAL DATA
gomathisankariv2
 
PPTX
Element 11. ELECTRICITY safety and hazards
merrandomohandas
 
PPTX
fatigue in aircraft structures-221113192308-0ad6dc8c.pptx
aviatecofficial
 
PPTX
Worm gear strength and wear calculation as per standard VB Bhandari Databook.
shahveer210504
 
PDF
Halide Perovskites’ Multifunctional Properties: Coordination Engineering, Coo...
TaameBerhe2
 
PPTX
Product Development & DevelopmentLecture02.pptx
zeeshanwazir2
 
PDF
Water Industry Process Automation & Control Monthly July 2025
Water Industry Process Automation & Control
 
DOCX
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
PPT
PPT2_Metal formingMECHANICALENGINEEIRNG .ppt
Praveen Kumar
 
PPTX
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
PPTX
Damage of stability of a ship and how its change .pptx
ehamadulhaque
 
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
Electrical Safety Presentation for Basics Learning
AliJaved79382
 
Mechanical Design of shell and tube heat exchangers as per ASME Sec VIII Divi...
shahveer210504
 
Zilliz Cloud Demo for performance and scale
Zilliz
 
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
Carmon_Remote Sensing GIS by Mahesh kumar
DhananjayM6
 
Arduino Based Gas Leakage Detector Project
CircuitDigest
 
What is Shot Peening | Shot Peening is a Surface Treatment Process
Vibra Finish
 
DATA BASE MANAGEMENT AND RELATIONAL DATA
gomathisankariv2
 
Element 11. ELECTRICITY safety and hazards
merrandomohandas
 
fatigue in aircraft structures-221113192308-0ad6dc8c.pptx
aviatecofficial
 
Worm gear strength and wear calculation as per standard VB Bhandari Databook.
shahveer210504
 
Halide Perovskites’ Multifunctional Properties: Coordination Engineering, Coo...
TaameBerhe2
 
Product Development & DevelopmentLecture02.pptx
zeeshanwazir2
 
Water Industry Process Automation & Control Monthly July 2025
Water Industry Process Automation & Control
 
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
PPT2_Metal formingMECHANICALENGINEEIRNG .ppt
Praveen Kumar
 
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
Damage of stability of a ship and how its change .pptx
ehamadulhaque
 

Top 15-asp-dot-net-interview-questions-and-answers

  • 1. Top 15 ASP.Net Interview Questions and Answers
  • 2. CRB Tech reviews compiles some important interview questions keeping your interest in concern. Hope this helps you in cracking your interviews. ASP.NET is the new ASP generation. It is does not fit with Classic ASP ASP.NET pages have the .aspx extension When a browser requests an ASP.NET file, the ASP.NET engine reads the file, compiles and executes the words in the file, and returns the result to the browser as plain HTML. ASP.NET is a development frame for building web pages and web sites with HTML, CSS, JavaScript and server scripting.
  • 3. 1. What is ASP? Active Server Pages is a Microsoft’s server-side technology, which helps in developing dynamic and user-friendly Web pages. 2. Define ASP.Net. It is a development framework for building web pages and web sites with HTML, CSS, JavaScript and server scripting.
  • 4. 3. ASP.net advantages? ASP.Net advantage over ASP : Compiled Code Language Support Strict Coding needs Event-Driven Programming Model 3rd Party Controls User Authentication Easier Configuration & Deployment Object and Page Caching Higher Scalability
  • 5. 4. How to maintain session in ASP.NET? In-process storage. Session State Service. Microsoft SQL Server. In-Process Storage The default location is the ASP.NET process itself. Session State Service It is an alternative to using in-process storage for session state. ASP.NET provides the ASP.NET State Service. The State Service gives you an alternative for storing session state that is not tied quite so closely to ASP. Net’s own process. Microsoft SQL Server It is the final choice for storing state information.
  • 6. 5. What is the difference between Server.Transfer and Response.Redirect? Server.Transfer() : The client sees it as on the requesting page , but all the content is of the requested page. Response.Dedirect() : Here the client know the physical location (page name and query string as well). 6. Types of comments in asp.net Single line comments // for single line comments Multiple line comments /* for multi line comments */ XML tags comments /// XML tags depicted in a code comment
  • 7. 7. Use of @RenderPage() method @RenderPage() method is used to bring content from separate files. Example: <html> <body> @RenderPage(“header.cshtml”) <h1>Hello Web Pages</h1> <p>This is a paragraph</p> @RenderPage(“footer.cshtml”) </body> </html>
  • 8. 8.What is the folder structure of ASP.NET Web Pages Logical Folder Structure Below is a basic folder structure for an ASP.NET web page: Folders The “Account” folder has log on and security files The “App_Data” folder has databases and data files The “Images” folder has images The “Scripts” folder has browser scripts The “Shared” folder has common files Physical folder structure Below is a basic folder structure for image C:userDocumentsMyWebSitesDemoImages From the example above: The virtual name of a web picture might be “Images/pic31.jpg”. But the physical name is “C:usereDocumentsMyWebSitesDemoImagespic31.jpg” URLs and Paths URLs are to access files from the web: http://www.demo.com/html/html5_intro.asp %>
  • 9. 9. Difference between globalization and localization Globalization is the process of creating a software product that functions in multiple locales. Localization is the way of adapting a globalized application, which you have already processed in a localized way, to a particular locale. 10. Define ViewState. It is the method that the ASP.NET page frame utilize to preserve page and control values between round trips. When the HTML markup for the page is given, the current state of the page and values that must be kept during post back are arranged into base64-encoded strings.
  • 10. 11. Name the methods used to force all the validation controls to run Page.Validate() method 12. What is the difference between Response.Write() and Response.Output.Write() methods? Response.write() doesn’t give output in format. The latter one helps you to give output in format Response.write – it writes the text stream , whereas Response.output.write – it writes the HTTP Output Stream.
  • 11. 13. Define Cookie A cookie is used to identify a user. It is a small file that the server implants on the user’s computer. Each time the same PC requests a page with a browser, it will send the cookie also. With ASP, one can both create and retrieve cookie values. 14. How to Create a Cookie? The “Response.Cookies” is used to create cookies. N.B. The command Response.Cookies must appear BEFORE the <html> tag. In the below example, we are creating a cookie named “fname” and give it the value “ABC” : <% Response.Cookies(“fname”)=”ABC” Response.Cookies(“fname”).Expires=#Jan 10,2015#
  • 12. 15. How to recover a Cookie Value? The command “Request.Cookies” is used to recover a cookie value. Example: <% firstname=Request.Cookies(“fname”) response.write(“Firstname=” & firstname) %> More questions would be coming next. We are updating our list of question and answers on .NET
  • 13. Stay connected to this page of CRB Tech reviews for more technical up- gradation and other resources. CRB Tech reviews will continue to enlighten you with such technical articles on .NET.