ASP.NET and C# Web Development Fundamentals
Questions covering ASP.NET controls, C# programming, .NET framework concepts, and web technologies including HTTP, DOM, and web services.
Questions
How do enable output cache for an ASP.Net page?
- <%@ PageCache Duration="60" %>
- <%@ OutputCache Duration="60" %>
- <%@ Cache Duration="60" %>
- <%@ SessionCache Duration="60" %>
Whats the top .NET class that everything is derived from?
- System.Object
- System.Page
- System.Web
- System.Namespace
Can you store multiple data types in System.Array?
- True
- False
Is it possible to add object in ViewState in .NET?
- Not Possible
- Always Possible
- Only If object have Serializable feature or have TypeConverter option
- Only if object is an String
What is the default port for Http?
- 8081
- 80
- 7071
- 500
How can we maintain the page scroll position after postback?
- Set PositionOnPostback as true in Page directive
- Set MaintainScrollPositionOnPostback as true in Page directive
- Set ViewState as true in Page directive
- Not Possible
Which of the following Protocols can be used to call a Web Services in Asp.net?
- Http-Post
- Http-Get
- SOAP
- All the above
How to get last month date from C# code?
- DateTime.Now.PreviousMonth;
- DateTime.Now.CurrentMonth - 1;
- DateTime.Now.AddMonths(-1);
- DateTime.Now.AddMonths(1);
What is DOM?
- Data Object Model
- Document Object Model
- Derived Object Model
- None of the above
How to create an alias name for a namespace in C#?
- using AliasName = System.Text;
- using System.Text AliasName;
- Alias System.Text AliasName;
- Not Possible
How can we get Client IP Address in ASP.NET?
- Request.ClientAddress
- Request.UserHostAddress
- Request.IPAddress
- Request.Client.IPAddress
Private, Protected, Public, Internal, Protected Internal are the access specifiers?
- True
- False
Only Abstract class, Static class and Sealed class are in .Net
- True
- False
An assembly is the basic unit used by the .NET CLR
- True
- False
DLL and assembly are same
- True
- False
ADO Record set can hold multiples tables data.
- True
- False
Multiple catch blocks cannot be executed for a single try statement
- True
- False
Once ASP.NET automatically parses and compiles the global.asax file into a dynamic .NET Framework class, which base class is extended?
- ASPApplication
- HttpsApplication
- ASPNETApplication
- NETApplication
- HttpApplication
You develop a page expecting a DataGrid to appear upon rendering, but it does not appear when you run the application. What is the likely explanation for the problem in the above scenario?
- The DataGrid control is not bound to its DataTable property.
- The DataGrid control is not bound to the table Header
- The DataGrid control is not bound to its DataSource property.
- The DataGrid control is not bound to its DataKeyField property
- The DataGrid control is not bound to its DataKeys property.