ASP.NET Programming Fundamentals
Test your knowledge of ASP.NET web framework, including controls, state management, caching, server objects, and web forms development.
Questions
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 ?
- Use the output cache
- Use the cache object
- Use the ASP.NET central cache
- Use the client cache
Which is not ture about Smartnavigation ?
- retain only the last page visited in the browser's history
- eliminate any flash caused by navigation
- Doesn't work with sites protected with SSL
- persist scroll position when moving from page to page
Which is true about ASP.net support ?
- ASP.NET doesn't support server-side includes
- ASP.NET doesn't support server-side includes but supports server-side object tags
- ASP.NET doesn't server-side object tags
- ASP.NET support server-side includes and server-side object tags
How to protect view state from tampering when it's passed over an unencrypted channel ?
- In Page directive set EnableViewStateMac="true"
- In Register directive set EnableViewStateMac="true"
- In web config set Protectviewstate="true"
- In IIS set Viewstate protection.
What method must be overridden in a custom control ?
- The Paint() method
- The Control_Build() method
- The Render() method
- The default constructor
What is used to validate complex string patterns like an e-mail address ?
- Extended expressions
- Regular expressions
- Irregular expressions
- Basic expressions
What does ASP stand for ?
- All Standard Pages
- Active Server Pages
- A Server Page
- Active Standard Pages
What ASP.NET object is used to get information about the web servers ?
- The Server object
- The Application object
- The Request object
- The Response object
What method(s) must be used with the Application object to ensure that only one process accesses a variable at a time ?
- Synchronize()
- Lock() and UnLock()
- Lock()
- Asynchroize()
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 ?
- The event registration
- A protected class member for the control
- A default event handler for the click event
- A default class that inherits from the control’s base class
What attribute must be set on a validator control for the validation to work ?
- Validate
- ValidateControl
- ControlToBind
- ControlToValidate
What HTML element is the asp:Label control rendered as when the target is Internet Explorer ?
- <label>
- <table>
Given an ASP.NET Web Form called WebForm1, what class does the WebForm1 class inherit from by default ?
- System.Web.Form
- System.Web.GUI.Page
- System.Web.UI.Page
- System.Web.UI.Form
Can two different .net programming languages be mixed in a single ASPX file ?
- Yes
- No
- May be
- None of the above
What is the file extension used for ASP.NET files ?
- .ASP
- .ASPX
- .Web
- None of the above
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
- 12
- 15
- 10
- 9
- Compilation error
- 24
consider the following C code int main() { printf("Hello world"); } Will this code compile?
- Sure , Why not?
- No This will not compile , Since the header file stdio.h is not included
- The code will compile but will fail to link.
- I dont Know :)
which of the following are true about static variables in C?
- Static variables are global variables
- static variales have local to the file/Scope they are declared , but exist throught the program life time
- static variables are scoped, Meanaing that they will be destroyed once out of scope
- Oh come on , Static variales are only in Java , Do not exist in C
- static variales have local to the file they are declared , and they will be destroyed once out of scope
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; }
- 0x22ff74
- 0x22ff70
- 0x22ff73
- Compiler error
- 19