Advanced Web Programming MCQ's With Answers
AWP UNIT 3 MCQ's
1. Which of the following gives the number of catch blocks that can be defined for a single try block.
- one
- two
- three
- The try block can have any number of catch blocks
Ans : The try block can have any number of catch blocks
2. Which of these keywords must be used to monitor exceptions?
- try
- catch
- finally
- else
Ans : try
3. Which of these keywords is not a part of exception handling?
- try
- catch
- thrown
- finally
Ans : thrown
4. In C#.NET if we do not catch the exception thrown at runtime then which of the following will catch it?
- compiler
- CLR
- linker
- loader
Ans : CLR
5. Which of the following is the Object Oriented way of handling run-time errors?
- onError
- Exception
- Errorcode
- Heresult
Ans : Exception
6. ____is superclass of all types of exceptions classes.
- DivideByzero
- Exceptionclass
- Exception
- IndexError
Ans : Exception
7. _________ uses a hidden field that ASP.NET automatically inserts in the final, rendered HTML of a web page
- Caption state
- View state
- application state
- button state
Ans : View state
8. The__________ is the portion of the URL after the question mark.
- string
- url
- query string
- app string
Ans : string
9. You configure session state through the _____________ file for your current application.
- web.config
- global
- aspx
- aspx.cs
Ans : web.config
10. _________allows you to store global objects that can be accessed by any client.
- Object
- Access
- Stateless
- Application s
Ans : Application s
11. Which of the following statements is correct?
- The throw keyword is not supported in C#.NET
- The throw keyword is used to throw an exception object programmatically
- The throw keyword is not used to throw an exception object programmatically
- The throw keyword is used in older versions of the .NET framework
Ans : The throw keyword is not used to throw an exception object programmatically
12. In C#.NET, an exception is?
- Compile time error
- logical error
- runtime error
- syntax error
Ans : runtime error
13. Which types of states manages in asp.net
- view state
- control state
- session state
- all of above
Ans : all of above
14. _________is name -value pair that is stored on the client 's computer query string
- View state
- cookie
- session
- state
Ans : cookie
15. Which is used to create a consistent look and behavior for all the pages in your web application.
- user control
- master page
- validation control
- nevigation control
Ans : master page
16. In which a style is that's placed directly inside an HTML tag
- internal style
- external style
- inline style
- none of the above
Ans : inline style
17. View state,control state, hidden fields and cookies are used for ______________ state management.
- client side
- server side
- client side and server side
- none of the above
Ans : client side
18. ________ are small files that are created in the web browser’s memory or on the client’s hard drive.
- Cookies
- query string
- application state variables
- strings
Ans : Cookies
19. Which of the following operator is used to pass first query string parameter?
- &
- ?
- @
- &&
Ans : ?
20. An external style sheet can be linked to a web page using ________ tag.
- <a>
- <script>
- <link>
- <meta>
Ans : <link>
21. HttpRequest class is present in ______________ namespace.
- System.Web
- System.Web.Security
- System.Web.UI
- System.Data
Ans : System.Web
22. Which of the following is not a method of HttpCookieCollection class?
- Add()
- Clear()
- Remove()
- Replace()
Ans : Replace()
23. Which of the following is a drowvback of Cookie?
- It do not require any server resources
- Easy to create and manipulate
- Users can delete cookie
- Cookies can be persistent
Ans : Users can delete cookie
24. _______________ is a server-side state management technique.
- Viewstate
- Cookies
- query string
- Application State
Ans : Application State
Post a Comment