Sunday, 11 October 2015

ASP.Net 3.5 using C# Test

ASP.Net 3.5 using C# Test

:: Home > Upwork > .Net Technology > ASP.Net 3.5 using C# Test

Which of the following types guarantee atomic reads and writes?

a. int
b. double
c. long
d. float

Which of the following accurately describes the class structure when implementing an ASP.Net page which uses the CodeFile attribute?

a. The actual instantiated class is dynamically created and has a base class defined in the CodeFile.
b. The actual instantiated class is dynamically created and has a member representing the class defined in the CodeFile.
c. The actual instantiated class is dynamically created and is a co-class of the class defined in the CodeFile.

Which of the following does using Initializer Syntax with a collection as shown below require?

CollectionClass<int> numbers = new CollectionClass<int> { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };

a. Collection Class must implement System.Collections.Generic.ICollection<T>
b. Collection Class must implement System.Collections.Generic.IList<T>
c. Each of the Items in the Initializer List will be passed to the Add<T>(T item) method

Which of the following does Event Bubbling allow composite controls to perform?

a. Propagate container related events to the child controls.
b. Propagate child events up to control hierarchy
c. Distribute events between peer child controls.
d. Translate control unhandled control events into exceptions.

Which of the following are true of using ADO.NET DataSets and DataTables?

a. The DataSets and DataTables objects requires continuous connection to the database
b. All tables in a dataset must come from the same database
c. A given instance of a DataTable can be in only one DataSet
d. Content from multiple DataSets can easily be combined into a single DataSet that contains the net result of all changes

Which of the following controls allows the use of XSL to transform XML content into formatted content?

a. System.Web.UI.WebControls.Xml
b. System.Web.UI.WebControls.Xslt
c. System.Web.UI.WebControls.Substitution
d. System.Web.UI.WebControls.Transform

With which of the following are Declarative Databinding expressions delimited?

a. <%# %>
b. <%-- --%>
c. <!-- -->
d. <# >

The following are the two statements regarding the DataRow from the DataRowCollection of a DataTable

Statement X: Use the DataRowCollection.Remove method to immediately delete the row.
Statement Y: Use the DataRow.Delete method to mark the row for deletion when DataRow.AcceptChanges is called.

a. Statement X is correct and Statement Y is incorrect
b. Statement X is incorrect and Statement Y is correct
c. Both Statements X, Y are correct
d. Both Statements X, Y are incorrect

When using asynchronous partial updates with an UpdatePanel, which of the following are true?

a. Only the UpdatePanel and any child controls go through the server lifecycle.
b. The entire page always goes through the entire lifecycle.
c. Only the UpdatePanel which initiated the Postback and its child controls can provide updated information.
d. UpdatePanels can not be used with Master Pages.

Which of the following can be used to preserve application state information?

a. ApplicationState
b. SessionState
c. ViewState
d. All of the above

Which of the following are required to be true by objects which are going to be used as keys in a System.Collections.HashTable?

a. They must handle case-sensitivity identically in both the GetHashCode() and Equals() methods.
b. Key objects must be immutable for the duration they are used within a HashTable.
c. Get HashCode() must be overridden to provide the same result, given the same parameters, regardless of reference equality unless the HashTable constructor is provided with an IEqualityComparer parameter.
d. Each Element in a HashTable is stored as a Key/Value pair of the type System.Collections.DictionaryElement
e. All of the above

Which of the following is not a characteristic, that a Query expression should have?

a. It must contain a from clause
b. It must begin with a select clause
c. It can end with a group clause

Which of the following is false about declarative attributes?

a. They must be inherited from the System.Attribute.
b. Attribute classes may be restricted to be applied only to application element types.
c. By default, a given attribute may be applied multiple times to the same application element.

Which of the following are true regarding the System.Collections.Generic.HashSet<T> class?

a. HashSet is an unordered collection.
b. The default EqualityComparer checks whether the element supplied to the HashSet is unique or not.
c. HashSet provides functionality for "conceptual sets" where the rules for membership can be specified without actually creating all of the items.

When using a JavaScript timer control in conjunction with UpdatePanels, which of the following statements are true?

a. The interval will never restart before the page postback is complete.
b. The timer control must be located outside of the UpdatePanel
c. If the timer expiration triggers a postback while a previous postback is in progress, the first postback is canceled.
d. The timer must always be specified as a trigger for the updatepanel which is to be update when the interval expires.

Which of the following is/are applicable while using Secure Socket Level communications?

a. A certificate must be installed on the server.
b. The certificate must match the web address to prevent a browser warning or error
c. The certificate must be issued by an authority recognized by the client computer to prevent a browser warning or error
d. All of the above

Which of the following is false about System.GC under version 3.5 of the .NET Framework?

a. You can request that the garbage collector processes a generation if it determines that it is appropriate at specific points in your code
b. You can control the intrusiveness of the garbage collector (how often it performs collections) while your program is running
c. You can control the intrusiveness of the garbage collector (how often it performs collections) only during application initialization

Where should an instance of an object which provides services to all users be stored?

a. ApplicationState
b. SessionState
c. ViewState
d. None of the above

What is the proper declaration of a method which will handle the following event?

Class MyClass
{
      public event EventHandler<MyArgs> MyEvent;
}

a. public void A_MyEvent(object sender, MyArgs e) { }
b. public void A_MyEvent(object sender, EventArgs e) { }
c. public void A_MyEvent(MyArgs e) { }

When using an automatic property, which of the following statements is true?

a. The compiler generates a backing field that is completely inaccessible from the application code.
b. The compiler generates a backing field that is accessible via reflection.
c. The compiler generates a code that will store the information separately from the instance to ensure its security.

Which of the following statements are applicable in LINQ to SQL?

a. It is pure Object Relational (O/R) model.
b. It is a set of enhancements to the DataSet and DataTable classes.
c. It requires the use of SQLServer as the database.
d. Because LINQ is based on Queries, it can not be used to modify the data in the database.

Which of the following attributes of the ProcessModel element of the Machine.Config file, is used to specify the level of authentication for DCOM security?

a. comAuthenticationLevel
b. comImpersonationLevel
c. maxIoThreads
d. requestQueueLimit

The output generated by the following code will be:

string t = @"This\Is\a\Test";
Response.Write(t);

a. ThisIsaTest
b. This\Is\a\Test
c. It will give a compilation error: Unrecognized escape sequence

With which class is the task of mapping a specific point in time into units such as weeks, months, and years accomplished?

a. System.Globalization.CultureInfo
b. System.Globalization.Calendar
c. System.DateTime

By which of the following can the .NET class methods be included in .aspx files?

a. Including .Net code within the script element with the runat attribute set to server
b. Including .Net code within the code element
c. Including .Net code using the @code directive on the page
d. Including .Net code within the execute attribute of the individual control

Which of the following is not an unboxing conversion?

a. void Sample1(object o) { int i = (int)o; }
b. void Sample1(ValueType vt) { int i = (int)vt; }
c. enum E { Hello, World} void Sample1(System.Enum et) { E e = (E) et; }
d. class C { public int Value { get; set; } } void Sample1(C vt) { int i = vt.Value; }

Which of the following are common methods of supplying "Help" information to an ASP.NET application?

a. Setting the ToolTip property of a control to a string containing the information.
b. using the open method of the browser window object to open a new browser window and display a help related ASP.NET page
c. Using the showHelp method of the browser window object to display a topic from a compiled help file (.chm).
d. All of the above

Which of the following can be used to control caching within an ASP.NET application?

a. Using the @OutputCache directive in the .aspx file.
b. Setting the HttpCachePolicy of the Cache property inside the Response object.
c. Using the Cache property of the Page Object.
d. All of the above

The earliest event in which all viewstate information has been restored is:

a. Init
b. PreLoad
c. Load
d. Render

Which of the following items are recommended when using XML comments to generate documentation?

a. <exception>
b. <code>
c. <summary>
d. All of the above

What will be the impact of using implicitly typed local variables as in the following example?

var sample = "Hello World";

a. The actual type is determined at compilation time, and has no impact on the runtime
b. The actual type is determined at runtime, and late binding takes effect
c. "var" itself is a specific type defined by the framework, and no special binding takes place

Which of the following conditions can trigger the automatic recycling of an ASP.NET application hosted in IIS?

a. A specific number of requests to the application process.
b. A percentage of physical memory utilized by the process.
c. A specific time interval
d. All of the above

Which of the following are true regarding System.Web.Mail and System.Net.Mail namespaces?

a. System.Web.Mail is not supported under version 3.5 of the Framework
b. System.Web.Mail is deprecated under version 3.5 of the Framework, and it is officially recommended that System.Net.Mail be used.
c. System.Web.Mail is the preferred solution when using IIS hosted applications
d. There are no functional differences; the items were moved to a new namespace to better reflect their applicability

To which of the following do automatic properties refer?

a. You declare (explicitly or implicitly) the accessibility of the property and get and set accessors, but do not provide any implementation or backing field
b. You attribute a member field so that the compiler will generate get and set accessors
c. The compiler creates properties for your class based on class level attributes
d. They are properties which are automatically invoked as part of the object construction process

Which of the following differentiates a UserControl from a Custom Server control?

a. UserControl can directly express rendering information via markup; a Custom Server control can not.
b. UserControl does not require the use of the @Register directive; a Custom Server control does require it.
c. UserControl can make use of script based validation; a Custom Server control can not.
d. UserControl can represent complete compositate hierarchy; a Custom Server control can not.

When using Cascading Style Sheets (CSS) to format output, which of the following is/are true?

a. Styles can be applied to all elements having the same CSS Class attribute
b. Styles can be applied to specific elements based on their ID attribute
c. Styles can be applied to elements based on their position in a hierarchy
d. Styles can be used to invoke script based code
e. All of the above

Which of the following is/are true regarding validation in an ASP.NET application?

a. Server validation can be used alongside with client side validation.
b. All data posted on Server, should be validated.
c. Client Side validation typically provides a faster response (feedback) time than server validation.
d. All of the above

The following are two statements related to System.DateTimeOffset namespace.

Statement X: DateTimeOffset values can be converted to DateTime values and vice versa.
Statement Y: DateTimeOffset does not supports arithmetical operations

a. Statement X is incorrect and Statement Y is correct
b. Statement X is correct and Statement Y is incorrect
c. Both Statements X, Y are correct
d. Both Statements X, Y are incorrect

When using a DataReader to access the results of a Database operation, which of the following is true?

a. The DataReader provides a cursor that can be used to move forward and backwards through the result.
b. The DataReader provides random access capabilities on the result.
c. The DataReader can provide the Schema information of the result to the application code.

Which of the following statements is false about Passport Authentication?

a. The Passport SDK must be installed.
b. Passport authentication requires a network path between the Client and the Microsoft Passport Server
c. Passport Authentication provides persistent authentication across sessions

In which file are Predefined Client Side Validation Scripts defined?

a. WebUIValidation.js
b. ClientValidation.js
c. AspNetValidation.js
d. USerValidation.js

Which of the following are true about System.Security.Cryptography under version 3.5 of the framework?

a. Support is provided for the "Suite B" set of cryptographic algorithms as specified by the National Security Agency (NSA).
b. Cryptography Next Generation (CNG) classes are supported on XP and Vista systems.
c. The System.Security.Cryptography.AesManaged class allows custom block size, iteration counts and feedback modes to support any Rijndael based encryption.

In order to enable AJAX Functionality, which control is placed on the page?

a. asp:ScriptManager
b. asp:AjaxManager
c. asp:PageManager
d. asp:ClientScriptManager

Which of the following are the goals of the Windows Communciation Foundation?

a. Bringing various existing communication technologies into a unified environment.
b. Cross vendor/platform communication.
c. Support for asynchronous communications.
d. Support for distributed applications based on technologies such as MSMQ and/or COM+
e. All of the above

a. @Register
b. @Include
c. @Control
d. @Import

Determining the availability of sufficient memory for an operation can be accomplished by:

a. creating an instance of System.Runtime.MemoryFailPoint and monitoring for an InsufficientMemoryException
b. creating an instance of System.Runtime.MemoryFailPoint and monitoring for an OutOfMemoryException
c. There is no supported application level means to determine if a specific amount of memory is available.

Which of the following are true about Extension methods.

a. They can be declared either static or instance members
b. They must be declared in the same assembly (but may be in different source files)
c. Extension methods can be used to override existing instance methods
d. Extension methods with the same signature for the same class may be declared in multiple namespaces without causing compilation errors

Which of the following events should be used for assigning a Theme dynamically to a page?

a. PreInit
b. Init
c. PreLoad
d. PreRender
e. Render

Which of the following are performed to fully debug an ASP.NET Application running on the same machine as the debugger?

a. Enabling debug information in the .NET Assembly
b. Setting the debug attribute of the compilation element to true in the web.config file.
c. Enabling ASP.NET debugging in the IIS metabase.

Custom non-fatal exceptions should be derived from:

a. ApplicationException
b. DataMisalignedException
c. ExecutionEngineException
d. SystemException

Which of the following is true about C# generics?

a. C# allows non-type template parameters
b. C# supports explicit specialization
c. C# allows the type parameter to be used as the base class for the generic type
d. C# enforces that all codes are valid for all types of parameters

Which of the following can one use to detect the user's current language?

a. Examining the UserLanguages property of the current Request object.
b. Examining the CurrentCulture property of the current Request object.
c. Examining the Language property of the current Page object.

Which of the following are included in the advantages of Lambda Expressions over Anonymous methods?

a. More concise syntax
b. The types for a Lambda Expression may be omitted
c. The body of an Anonymous method can not be an expression
d. Lambda Expressions permit deferred type inference, that anonymous methods do not
e. All of the above

Which of the following is/are true regarding the use of Authentication to control access to the HTML file (.htm or .html)?

a. ASP.NET authentication handles these by default in a manner equivalent to .aspx pages
b. ASP.NET authentication can be associated with these extensions using aspnet_isapi.dll in IIS 6.0, for the appropriate directory
c. ASP.NET authentication cannot be used for this purpose

The default number of threads per processor in the System.Threading.ThreadPool class under version 3.5 of the Framwork is:

a. 1
b. 25
c. 250
d. 100
e. 500

Where should information about a control created at design time be stored?

a. ApplicationState
b. SessionState
c. ViewState
d. None of the above

The rights of which Windows Account does anonymous Web Site access use by default?

a. Administrator
b. IUSER_MachineName (where the MachineName is the actual computer name)
c. ASPNET
d. Guest

Given the code below, which items will cause a compilation error?

static void F1(params int [] y)
{
}

static void Sample()
{
   int [] j = new Int32[3];
List k = new List();
// ANSWER GOES HERE
}

a. F1(j);
b. F1(k);
c. F1(1, 2, 3);
d. F1(new [] {1,2,3})
e. None of the above

In order to use the AJAX AuthenticationService class, which of the following must be true?

a. It must be enabled in the web.config of the ASP.Net application.
b. Forms Authentication must be enabled in the web.config of the ASP.Net Application
c. Cookies must be enabled in the browser
d. A redirection url must be supplied for successful login.

In which of the following events, the final changes to the contents of the page or its controls could be made.

a. Load
b. LoadComplete
c. PreRender
d. Init

Which of the following are true about Nullable types?

a. A Nullable type is a reference type.
b. An implicit conversion exists from any non-nullable value type to a nullable form of that type.
c. A predefined conversion from the nullable type S? to the nullable type T? exists if there is a predefined conversion from the non-nullable type S to the non-nullable type T

Which of the following is used to remove a cookie from a client machine?

a. Remove the cookie from the System.Web.UI.Page.Request.Cookies collection.
b. Remove the cookie from the System.Web.UI.Page.Request.Browser.Cookies collection.
c. Set the Expires property to DateTime.Now for a cookie in the Web.UI.Page.Response.Cookies
d. Remove the cookie from the System.Web.UI.Page.Response.Cookies collection.

When Windows Communication Foundation is used to develop a Web Service, which of the following are supported?

a. WS-Addressing
b. WS-MetadataExchange
c. WS-Security
d. WS-Atomic Transaction
e. All of the above

To which contract is the SessionMode property to disallow, require, or permit applied when Windows Communication Foundation is used?

a. ServiceContract
b. OperationContract
c. DataContract
d. MessageContract

Via which of the following is ViewState maintained by default?

a. A hidden variable within the page that is included with each round tip.
b. A cookie which resides on the clients computer
c. A server side in-process memory cache
d. Instance member variables of the Page class
Disqus Comments