Sunteți pe pagina 1din 15

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

* * * * Extended expressions Regular expressions Irregular expressions Basic expressions

Regular Expression.

The following is a valid statement in ASP.NET<%@ Page Language="C" %>


* True * False False

A valid comment block in ASP.NET is


* * * * <!- - - Comment - - - > <!- - Comment - - > <% - - Comment - - %> <% ! - - Comment - - >

<% - - Comment - - %>

The event handlers that can be included in the Global.asax file are
* Application Start and Session Start event handlers only * Application End and Session End event handlers only * Per-request and Non-deterministic event handlers only * Application Start and End , Application Start and End

A Few of the Namespaces that get imported by default in an ASPX file are
* System, System.Data, System.Drawing, System.Globalization * System, System.IO, System.Management, System.Globalization * System, System.Collections, System.Text, System.Web * System, System.NET, System.Reflection, System.Web System, System.Collections, System.Text, System.Web

The Assemblies that can be referenced in an ASPX file without using @Assembly Directive is
* System.dll, System.Data.dll, System.Web.dll, System.Xml.dll, * System.dll, System.Collections.dll, System.IO.dll

* System.dll, System.Reflection.dll, System.Globalization.dll, * System.Drawing.dll, System.Assembly.dll, System.Text.dll System.dll, System.Data.dll, System.Web.dll, System.Xml.dll

An .ASHX file contains the following


* Code-behind that are used in the code * Server Controls that can be called from a code-behind file * HTTP handlers-software modules that handle raw HTTP requests received by ASP.NET * Contains normal ASP.NET code and can be used as an include file HTTP handlers-software modules that handle raw HTTP requests received by ASP.NET

What is the output for the following code snippet:


public class testClass

{ {

public static void Main(string[] args) System.Console.WriteLine(args[1]); }//end Main }//end class testClass * * * * Compiler Error Runtime Error Hello C# world None of the above

Runtime Error

One of the possible way of writing an ASP.NET handler that works like an ISAPI filter- that is, that sees requests and responses and modifies them also, is by,
* writing a module that extends FormsAuthenticatonModule and using it * writing a component class that extends HttpModuleCollection and using it * writing an HTTP module-a Class that implements IhttpModule and registering it in Web.Config * All of the above writing an HTTP module-a Class that implements IhttpModule and registering it in Web.Config

The ASP.NET directive that lets you cache different versions of a page based on varying input parameters, HTTP headers and browser type is
* @OutputCache * @CacheOutput * @PageCache

* @CacheAll @ OutputCache

If we develop an application that must accommodate multiple security levels through secure login and ASP.NET web application is spanned across three web-servers (using round-robin load balancing) what would be the best approach to maintain login-in state for the users?
* <SessionState mode="InProc"stateConnectionString=" tcpip=127.0.0.1:42424" sqlConnectionString=" data source=127.0.0.1;user id=sa;password="cookieless="false" timeout="30" /> * <SessionState mode="OutProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;user id=sa;password=" cookieless="false" timeout="30" /> * <SessionState mode="stateserver" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;user id=sa;password=" cookieless="false" timeout="30" /> SessionState mode=stateserver stateConnectionString=tcpip=127.0.0.1:42424? sqlConnectionString=data source=127.0.0.1;user id=sa;password= cookieless=false timeout=30?

What is the output for the below mentioned compilation command>csc /addmodule:A.Exe B.Cs
* * * * A.exe B.exe A.dll B.dll

B.exe

How can be the web application get configured with the following authorization rules
* Anonymous users must not be allowed to access the application. * All persons except David and John must be allowed to access the application. o <authorization><allow roles ="*"><deny roles = "?"><</authorization> o <authorization><deny users = "applicationname\David; applicationname\John" ><deny users = "*"></authorization> o <authorization><deny users = "applicationname\David, applicationname\John" ><deny users = "?"><allow users ="*"></authorization> o <authorization><allow users ="*"><deny users = "applicationname\David, applicationname\John" ></authorization> authorization deny users = applicationname\David, applicationname\John deny users = ? allow users =* /authorization

What will be the output of the following code snippet?


using System; class MainClass

{ {

static void Main( ) new MainClass().Display( 3.56 );

}
private void Display( float anArg )

{ }

Console.Write( {0} {1}, anArg.GetType(), anArg ); double Display( double anArg )

{
Console.Write( {0} {1}, anArg.GetType(), anArg ); return anArg;

}
public decimal Display( decimal anArg )

{
Console.Write( {0} {1}, anArg.GetType(), anArg ); return anArg;

} }
* * * * System.Single 3.56 System.Float 3.56 System.Double 3.56 System.Decimal 3.56

System.Double 3.56

What will be output for the given code?


Dim I as integer = 5 Do I=I+2 Response.Write (I & " ") Loop Until I > 10 * * * * 58 579 7 9 11 Errors out

7 9 11 (if corrected)

Which of the following operators has the highest precedence?


* Pre Increment (++x) * Shift bits left: << * Bitwise Or: |

* Post Increment (x++) Shift bits left

The uniqueId that gets generated at the start of the Session is stored in
* * * * Client computer as a cookie Server machine Passed to and fro on each and every request and response Both a and b are correct

Both a and b are correct

State True or False: C# supports multiple-inheritance


* True * False False

Bitwise AND operator in C# is


* * * * & && AND XAND

Answer1: && Answer2: &

Bitwise OR operator in C# is
* * * * OR || | XOR

Answer1: || Answer2: |

Whats the .NET datatype that allows the retrieval of data by a unique key?
* * * * Primary Integer Unique Identifier HashTable

HashTable

The keyword int maps to one of the following .NET types


* * * * System.Int16 System.Int32 System.Int64 System.Int128

System.Int32

What can be achieved in IL which is not possible in C# ?


* * * * Creation Creation Creation Creation of of of of an ArrayList a Dictionary a two dimensional array a non-zero based array

Answer1: Creation of a dictionary Answer2: Creation of a non-zero based array

Which of the following is the correct code for setting a Session timeout of 30 minutes
* * * * Session.Timeout Session.Timeout Session.Timeout Session.Timeout = = = = 108000 1800 300 30

Answer1: Session.Timeout = 1800 Answer2: Session.Timeout = 30

The process that ASP.NET uses to keep track of Sessions without cookies is
* * * * Cookie Cookie Cookie Cookie Munging Monking Mocking Munching

Cookie munging

The method that transfers ASP.NET execution to another page, but returns to the original page when it is done is
* * * * Server.Transfer() Server.Redirect() Server.Execute() Server.Return()

Answer1: Server.Redirect()

Answer2: Server.Execute()

A structure in C# can be derived from one or more


* * * * class interface both none

interface.

State True or False: Static method cannot be overridden


* True * False True

The Equivalent HTML Control for the <input type=button> tag is


* * * * HtmlInput HtmlButton HtmlPushButton HtmlInputButton

HtmlInputButton

The Equivalent Html Control for the <input type=checkbox> tag is


* * * * HtmlCheckBox HtmlInputChkBox HtmlInputCheckBox HtmlInputTypeChkBox

HtmlInputCheckBox

Which operator is used for connecting a event with a procedure in C#?


* * * * += = both none

+=

The Equivalent Html Control for the <select> tag is


* * * * <HtmlSelectInput> <HtmlSelect> <HtmlInputSelect> <HtmlSelectControl>

<HtmlSelect>
State True or False: Events in Web forms are processed before the Page Load event

* True * False True

What namespaces are necessary to create a localized application?


* * * * System.Globalization System.Globalization and System.Resources. System.Resources. System.Array

System.Resources

A new server-side control can be created by implementing the class


* * * * System.Web.WebControl System.Web.UI.WebControl System.Web.UI.WebControls.WebControl Any one of the above

System.Web.UI.WebControls.WebControl

The parameter clienttarget = downlevel does one of the following


* Adds aliases for specific user agents to an internal collection of user agent aliases * Indicates the useragents level of validating the controls * Disables all DHTML events(including Validation controls) * None of the above None of the above

The methods in C# can be overloaded in which of the following ways


* By having the same method name parameters * By giving different method names * By having the same method name parameters * By giving different method names and specifying different number of and same number of parameters and specifying different types of and same types of parameters

By having the same method name and specifying different types of parameters

The RangeValidator control supports the following datatype


* * * * Integer and String Integer, Float, String, XMLDatatypes Integer, String and Date Integer, Boolean, Short, String and Date

Integer, String and Date

What is the difference between Convert.ToInt32 and int.Parse?


* Both are same and both can handle null value. * Convert.ToInt32 can handle null value but int.Parse throws

ArgumentNullException error. * int.Parse can handle null value but Convert.ToInt32 throws ArgumentNullException error. * Both Convert.ToInt32 and int.Parse cannot handle null value. Convert.ToInt32 can handle null value but int.Parse throws ArgumentNullException error.

State True or False: Any ODBC-compliant database can be accessed through ASP.NET
* True * False True

You need to select a .NET language that has auto-documenting features built into the source code and compiler. Given the scenario above what language compiler should be selected?
* * * * vbc.exe cl.exe ilasm.exe cs.exe

cs.exe

A set of tables are maintained in a Dataset as


* * * * TablesCollection object DataTableCollection object DataRowsCollection object TableRowCollection object

TablesCollection object

The namespaces needed to use data mechanisms in ASP.NET pages are


* * * * System.Data, System.Data.OleDb or System.Data.SQL System.Data, System.Data.ODBC System.Data, System.Data.DataRow System.Data.DataRowCollection, System.Data.DbType

System.Data, System.Data.OleDb or System.Data.SQL

What are the different methods to access Database in .NET ?


* * * * OleDB,ODBC,SQLClient OleDB, JDBC, SQLServer ODBC-JDBC, DataSet, SQLClient Datasource, DataSet, DSN

OleDB,ODBC,SQLClient

The two properties of a DataGrid that has to be specified to turn on sorting and paging respectively are

* * * *

EnableSorting = true and EnablePaging = true DisableSorting = false and DisablePaging = false AllowSorting = true and AllowPaging = true Sorting = true and Paging = true

AllowSorting = true and AllowPaging = true

Which one of the following objects is used to create a foreign key between two DataTables?
* * * * DataRelation DataRelationship DataConstraint DataKey

DataRelation

The Syntax for data-binding expressions is


* * * * <%# property or collection %> <%# property or collection #%> <%$ property or collection %> <%@ property or collection %>

<%# property or collection #%>

The method that need to be invoked on the DataAdapter control to load the generated dataset with data is
* * * * Bind() Fill() FillData() SetData()

Fill()

Which of the following operations can you NOT perform on an ADO.NET DataSet?
* * * * A DataSet can be synchronised with the database. A DataSet can be synchronised with a RecordSet. A DataSet can be converted to XML. You can infer the schema from a DataSet

A DataSet can be synchronised with a RecordSet.

Which is the correct statement to set the alias name for namespace in C#?
* * * * using System Data.OracleClient = aliasName; using aliasName = System.Data.OracleClient; string aliasName = using.System.Data.OracleClient; Both a & b

using aliasName = System.Data.OracleClient;

The property that indicates whether existing database constraints should be observed when performing updates
* * * * EnforceConstraints Constraints GetConstraints ConstraintsEnforce

EnforceConstraints

State True or False: If you set AutoGenerateColumns=True and still provide custom column definitions, the DataGrid will render both
* True * False False.

The data from an XSL Transform with XmlReader can be returned in one of the following ways
* * * * objReader = objXslT.Transform(objNav, nothing) objXslT.Transform(objNav, nothing) objReader = objXslT.Transform(objNav, nothing, objWriter) objXslT.Transform(objNav, nothing, objWriter)

objXslT.Transform(objNav, nothing)

Pick the command line that would result in the C# compiler generating an XML documentation file
* * * * csc /doc:NewHome.xml NewHome.cs c /doc /docfile: NewHome.xml NewHome.cs csc /doc /out: NewHome.xml NewHome.cs csc /xml NewHome.cs

csc /doc:NewHome.xml NewHome.cs

What is the comment syntax for C#s XML-based documentation? * /** and **/ * //# * /// * //*
///

When creating a C# Class Library project, what is the name of the supplementary file that Visual Studio.NET creates that contains General Information about the assembly?
* * * * AssemblyInfo.xml AssemblyInfo.cs AssemblyInformation.cs AssemblyAttributes.cs

AssemblyInfo.cs

Which of the following is the C# escape character for Null?


* * * * \n \0 \f \v

\0

What is the exception that is thrown when there is an attempt to dynamically access a method that does not exist?
* * * * MissingMethodException TypeLoadException MethodLoadException MethodAccessException

MissingMethodException

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()

Lock()

After capturing the SelectedIndexChanged event for a ListBox control, you find that the event handler doesnt execute. What could the problem be?
* * * * The The The The AutoEventWireup attribute is set to False AutomaticPostBack attribute is set to False codebehind module is not properly compiled ListBox must be defined WithEvents

AutoPostBack attribute is set to False

What method must be overridden in a custom control?


* * * * The The The The Paint() method Control_Build() method Render() method default constructor

The Render() method

Which of the following languages is NOT included in the default .NET Framework installation?
* * * * C# VB.NET JScript.NET VBScript.NET

VBScript.NET

What are the different types of serialization supported in .NET Framework


* * * * XmlSerializer SoapFormatter XPathNavigator HttpFormatter

xmlserializer

The CLR uses which format for assembly version numbers


* * * * Major:Minor:Revision:Build Major:Build:Minor:Revision Major:Revision:Minor:Build Major:Minor:Build:Revision

Major:Minor:Build:Revision

What tool is used to manage the GAC?


* * * * GacMgr.exe GacSvr32.exe GacUtil.exe RegSvr.exe

GacUtil.exe

State True or False: A single .NET dll can contain unlimited classes
* True * False True

State True or False: ASP.NET can currently run only on Windows Platform
* True * False True

Which one of the following best describes Type-Safe


* It ensures that the data type are safely handled * It ensures that types are not mismatched when they are called so uses a typecasting before referencing any data object * It ensures that an object only references memory locations that its allowed to, preventing data corruption and the accidental misuse of object types * All of the above

All of the above

The number of objects in ASP.NET is


*6

*7 *9 * 10 Answer1: 7 Answer2: 10

The code used to turn off buffering is


* * * * Buffering = false OutputBuffer = false BufferOutput = false Buffer = Off

Answer1: Buffer=true Answer2: Buffer=false

Can you have two applications on the same machine one which is using .NET Framework 1.1 and the other using 2.0 ?
* Yes * No * Depends on System configuration Yes

Which of the following DOT.NET tools manages certificates, certificate trust lists (CTLs), and certificate revocation lists (CRLs)?
* * * * sn.exe certnet.exe certmgr.exe gacutil.exe

certmgr.exe

You need to generate a public/private key pair for using in creating a shared assembly. Given the above scenario, which .NET SDK utility should be used?
* * * * certmgr.exe gacutil.exe sn.exe resgen.exe

sn.exe

The object that contains all the properties and methods for every ASP.NET page, that is built is
* Page Object

* HTTPPage Object * WebPage Object * System.Web.UI.Page Page Object

In C#, which character is used to indicate a verbatim string literal?


* * * * @ ! " #

S-ar putea să vă placă și