ASP.NET Programming Fundamentals

Test your knowledge of ASP.NET web framework, including controls, state management, caching, server objects, and web forms development.

19 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

You are the developer of a web application that is retrieving historical books information from a database server and displays it to the users of your application. What cache strategy will give you the best performance ?

  1. Use the output cache
  2. Use the cache object
  3. Use the ASP.NET central cache
  4. Use the client cache
Question 2 Multiple Choice (Single Answer)

Which is not ture about Smartnavigation ?

  1. retain only the last page visited in the browser's history
  2. eliminate any flash caused by navigation
  3. Doesn't work with sites protected with SSL
  4. persist scroll position when moving from page to page
Question 3 Multiple Choice (Single Answer)

Which is true about ASP.net support ?

  1. ASP.NET doesn't support server-side includes
  2. ASP.NET doesn't support server-side includes but supports server-side object tags
  3. ASP.NET doesn't server-side object tags
  4. ASP.NET support server-side includes and server-side object tags
Question 4 Multiple Choice (Single Answer)

How to protect view state from tampering when it's passed over an unencrypted channel ?

  1. In Page directive set EnableViewStateMac="true"
  2. In Register directive set EnableViewStateMac="true"
  3. In web config set Protectviewstate="true"
  4. In IIS set Viewstate protection.
Question 5 Multiple Choice (Single Answer)

What method must be overridden in a custom control ?

  1. The Paint() method
  2. The Control_Build() method
  3. The Render() method
  4. The default constructor
Question 6 Multiple Choice (Single Answer)

What is used to validate complex string patterns like an e-mail address ?

  1. Extended expressions
  2. Regular expressions
  3. Irregular expressions
  4. Basic expressions
Question 7 Multiple Choice (Single Answer)

What does ASP stand for ?

  1. All Standard Pages
  2. Active Server Pages
  3. A Server Page
  4. Active Standard Pages
Question 8 Multiple Choice (Single Answer)

What ASP.NET object is used to get information about the web servers ?

  1. The Server object
  2. The Application object
  3. The Request object
  4. The Response object
Question 9 Multiple Choice (Single Answer)

What method(s) must be used with the Application object to ensure that only one process accesses a variable at a time ?

  1. Synchronize()
  2. Lock() and UnLock()
  3. Lock()
  4. Asynchroize()
Question 10 Multiple Choice (Single Answer)

When an ASP.NET server control is added to a Web Form, Visual Studio .NET adds one item to the class for the form. What item is added ?

  1. The event registration
  2. A protected class member for the control
  3. A default event handler for the click event
  4. A default class that inherits from the control’s base class
Question 11 Multiple Choice (Single Answer)

What attribute must be set on a validator control for the validation to work ?

  1. Validate
  2. ValidateControl
  3. ControlToBind
  4. ControlToValidate
Question 12 Multiple Choice (Single Answer)

What HTML element is the asp:Label control rendered as when the target is Internet Explorer ?

  1. <label>
  2. <table>
Question 13 Multiple Choice (Single Answer)

Given an ASP.NET Web Form called WebForm1, what class does the WebForm1 class inherit from by default ?

  1. System.Web.Form
  2. System.Web.GUI.Page
  3. System.Web.UI.Page
  4. System.Web.UI.Form
Question 14 Multiple Choice (Single Answer)

Can two different .net programming languages be mixed in a single ASPX file ?

  1. Yes
  2. No
  3. May be
  4. None of the above
Question 15 Multiple Choice (Single Answer)

What is the file extension used for ASP.NET files ?

  1. .ASP
  2. .ASPX
  3. .Web
  4. None of the above
Question 16 Multiple Choice (Single Answer)

A simple macro to double a number was written as follows #define double(X) X*X #include using namespace std; int main() { std::cout<<double(3+3); } What is the output here

  1. 12
  2. 15
  3. 10
  4. 9
  5. Compilation error
  6. 24
Question 17 Multiple Choice (Single Answer)

consider the following C code int main() { printf("Hello world"); } Will this code compile?

  1. Sure , Why not?
  2. No This will not compile , Since the header file stdio.h is not included
  3. The code will compile but will fail to link.
  4. I dont Know :)
Question 18 Multiple Choice (Single Answer)

which of the following are true about static variables in C?

  1. Static variables are global variables
  2. static variales have local to the file/Scope they are declared , but exist throught the program life time
  3. static variables are scoped, Meanaing that they will be destroyed once out of scope
  4. Oh come on , Static variales are only in Java , Do not exist in C
  5. static variales have local to the file they are declared , and they will be destroyed once out of scope
Question 19 Multiple Choice (Single Answer)

A variable i of type int is stored in memory location 0x22ff74. Now assuming that I have a pointer to i , What does the following C/C++ code produce as output.(assume standard sizes) int main() { int i=20; int *ptr=&i; ptr=ptr-1; cout<<ptr; }

  1. 0x22ff74
  2. 0x22ff70
  3. 0x22ff73
  4. Compiler error
  5. 19