ASP.NET interview questions with Answers

ASP.NET interview questions with Answers 2021 | Freshers and Experience

Computer Programming Quiz Interview Questions

ASP.NET interview questions with Answers

solved ASP.NET questions will help you prepare for technical interviews and online selection tests during campus placement for freshers and job . Microsoft .NET Certification Training.The ASP.NET interview questions and answers mentioned over here are usually asked to freshers/beginners

Q1.. The file extension an ASP.NET web form is –

A. .docx
B. .aspx
C. .jpeg
D. None of the above

Option B – .aspx

Q2.Application_Start event is available in __ .

A. Web.config
B. Local.asax
C. Global.asax
D. none of these

Option C – Global.asax

Q3.__ is not an ASP.NET page event.

A. Load
B. Init
C. Import
D. All of the mentioned

Option C – Import

Q4.ASP.NET was first released in

A. January 2003
B. January 2002
C. Feb 2002
D. January 2001

Option B – January 2002

Q5.Which of the following method is used to dynamically register client script from code?

A. RegisterScript
B. Page.ClientScript
C. Page.ClientScript.RegisterClientScriptBlock
D. None of the above

Option C – Page.ClientScript.RegisterClientScriptBlock

Q6.In a SQL Statement while working with SqlCommand it returns a single value, at that time ……………….. method of Command Object will be used.

A. ExecuteScalar
B. ExecuteReader
C. ExecuteNonQuery
D. None of the above

Option A – ExecuteScalar

Q7.How can we create a FileSystemObject in Asp.net?

A. Create(“FileSystemObject”)
B. Server.CreateObject(“FileSystemObject”)
C. Create Object:”Scripting.FileSystemObject”
D. Server.CreateObject(“Scripting.FileSystemObject”)

Option D – Server.CreateObject(“Scripting.FileSystemObject”)

Q8.which of the following are the stages of the Asp .Net web page.
i) Start
ii) Load
iii) Upload
iv) Validation

A) i, ii and iii only
B) ii, iii and iv only
C) i, ii and iv only
D) All i, ii, iii and iv

Option C- i, ii and iv only

Q9.Which of the following are the disadvantages of using the query string.
i) Limited capacity
ii) Server resources are required
iii) Potential security risks

A) i and ii only
B) i and iii only
C) ii and iii only
D) All i, ii and iii

Option B – i and iii only

Q10. State whether the following statements about the cookie are True or False.
i) The server can’t read the cookie and extract its value. It’s only accessible from the client side.
ii) Cookies having an expiration date is called a persistent cookie.
iii) Non-persistent types of cookies aren’t stored in the client’s hard drive permanently.

A) i-True, ii-False, iii-False
B) i-True, ii-True, iii-False
C) i-False, ii-True, iii-True
D) i-False, ii-False, iii-True

Option C – i-False, ii-True, iii-True

Q11.The … data-bound control is used to display a single record at a time.

A) Listview
B) Details view
C) Formview
D) Record view

Option C – Formview

Q12. Which of the following are the stages of the Asp .Net web page.
i) Start
ii) Load
iii) Upload
iv) Validation

A) i, ii and iii only
B) ii, iii and iv only
C) i, ii and iv only
D) All i, ii, iii and iv

Option C – i, ii and iv only

Q13.ASP (aka Classic ASP) was introduced in?

A. 1997
B. 1998
C. 1999
D. 2000

Option B – 1998

Q14.Classic ASP pages have the file extension?

A. .aspx
B. .net
C. .asp
D. .cs

Option C – .asp

Q15.ASP.NET is?

A. client side technologies
B. server side technologies
C. Both A and B
D. None of the above

Option C – Both A and B

Q16.Difference between Response.Write() andResponse.Output.Write().

A. Response.Output.Write() allows you to buffer output
B. Response.Output.Write() allows you to write formatted output
C. Response.Output.Write() allows you to flush output

D. Response.Output.Write() allows you to stream output

Option B – Response.Output.Write() allows you to write formatted output

Q17.Attribute must be set on a validator control for the validation to work

A. ControlToValidate
B. ControlToBind
C. ValidateControl
D. Validate

Option A – ControlToValidate

Q18.Default Session data is stored in ASP.Net.

A. StateServer
B. Session Object
C. InProcess
D. All of the above

Option C – InProcess

Q19. … are the common properties of web server controls of Asp .Net.
i) Runat
ii) Textmode
iii) Width
iv) Visible

A) i, ii and iii only
B) i, iii and iv only
C) i, ii and iv only
D) All i, ii, iii and iv

Option B – i, iii and iv only

Q20.State whether the following statements about the Formview control are True or False.
i) In the Formview control, each row of the table displays each field of the record.
ii) In this view, a developer can modify the layout for displaying the record.

A) i-True, ii-False
B) i-True, ii-True
C) i-False, ii-True
D) i-False, ii-False

Option B – i-True, ii-True

Q21.With … control, a developer can display an entire collection of data sorting or paging option in the table.

A) Details view
B) DataList
C) Listview
D) Gridview

Option D – Gridview

Q22.Which of the following are the templates that are supported by Formview control.
i) DataTemplate
ii) PagerTemplate
iii) ItemTemplate
iv) HeaderTemplate

A) i, ii and iii only
B) ii, iii and iv only
C) i, iii and iv only
D) All i, ii, iii and iv

Option B – ii, iii and iv only

Q23.Which of the following are the features of Cookies.
i) It can be changed depending on requirements.
ii) It stores information temporarily.
iii) It requires only a few bytes or KBs of space.

A) i and ii only
B) ii and iii only
C) i and iii only
D) All i, ii and iii

Option D – All i, ii and iii

Q24.Which of the following are the templates that are supported by Formview control.
i) DataTemplate
ii) PagerTemplate
iii) ItemTemplate
iv) HeaderTemplate

A) i, ii and iii only
B) ii, iii and iv only
C) i, iii and iv only
D) All i, ii, iii and iv

Option B – ii, iii and iv only

Q25.… are the common properties of validation controls of Asp .Net.
i) Error message
ii) Display
iii) Type
iv) Text

A) i, ii and iii only
B) i, iii and iv only
C) i, ii and iv only
D) All i, ii, iii and iv

Option C – i, ii and iv only

Leave a Reply

Your email address will not be published. Required fields are marked *