ASP Question Bank
ASP Question Bank
A) Java
B) C#
C) Python
D) Ruby
Answer: B) C#
A) .html
B) .aspx
C) .php
D) .js
Answer: B) .aspx
A) <form>
B) <table>
C) <asp:TextBox>
D) <div>
Answer: C) <asp:TextBox>
Which of the following is not a valid event in the Page Lifecycle of an ASP.NET page?
A) Page_Load
B) Page_Start
C) Page_Init
D) Page_Unload
Answer: B) Page_Start
A) InProc
B) SQLServer
C) Stateful
D) StateServer
Answer: C) Stateful
B) To redirect the user to another web page within the same application
Answer: B) To redirect the user to another web page within the same application
A) Forms
B) Windows
C) Passport
D) Basic
Answer: C) Passport
What is a cookie in ASP.NET?
A) System.Web.Security
B) System.Web.UI
C) System.Net
D) System.Web.HttpCookie
Answer: D) System.Web.HttpCookie
What is the maximum size of a single cookie that can be stored on the client-side in ASP.NET?
A) 1 KB
B) 2 KB
C) 4 KB
D) 8 KB
Answer: C) 4 KB
Which property of the HttpCookie class is used to set the expiration time of a cookie?
A) Expires
B) MaxAge
C) Duration
D) Timeout
Answer: A) Expires
A) Application
B) Session
C) Page
D) Request
Answer: D) Request
Which event handler is typically used to read cookies when a page is requested in ASP.NET?
A) Page_Init
B) Page_Load
C) Page_PreRender
D) Page_Unload
Answer: B) Page_Load
Which of the following is a potential security risk associated with cookies in ASP.NET?