Tuesday, November 4, 2008

at 2:54 AM Posted by senthil

1) How many classes can a single .NET DLL containMany (Correct)

2) You have several users with Windows user accounts who are using your new ASP.Net web application to retrieve data from the SQL Server 2000 database. Each user connects to the database using his/her user account. There are now several hundred users, using the data. How can you improve performance of the web application?

1. Stop using the database to retrieve the data.
2. Use Basic authentication
3. Use the same connection string for the database connections (Correct)
4. Use SQL Server authentication.

3. The following namespace is used for globalization:

1. System.Globalization (Correct)
2. System.Localization
3. System.Locale

4) The following type of class can’t be instantiated

1. absolute
2. abstract (Correct)
3. super
4. None

5) What is the Global.asax used for

1. Used to implement application and session level events. (Correct)
2. Only Application Levels
3. Only Session Levels

6) We declare an integer variable 'x' in C# as _____________

1. x integer;
2. integer x;
3. int x; (Correct)

7) Can you inherit multiple interfaces?

1. Yes (Correct)
2. No

8) Both which of the following statements would you use to properly describe unit testing?

1. with carefully planned test data, run the module to see if it works according to its specifications (Correct)

2. Testing performed by users, just before the Web Application is released

3. With carefully planned test data, run a module to see if it integrates well with other modules

4. Test and fix the errors.

9) Which is the most appropriate place to install a Strong-Named assembly that is intended for use among several web applications?

1. A. GAC on the local area network Primary Domain Controller (PDC) server
2. The Global Assembly Cache on the Web Server. (Correct)

3. The Virtual Directory of the ASP.Net Web Application
4. The solution's /bin directory

12) Given the following methods of the ASP .Net Page class, in which of them would you attach an event handler to an event published by a control on the web page?

1. OnLoad()
2. Page_Loader()
3. OnInit() (Correct)
4. OnPostBack()

13) What is the correct order of execution for these handlers during the loading of an ASP.Net page: button_onclick, page_init, page_load, page_prerender?

1. page_load, page_init, page_prerender, button_onclick
2. page_init, page_load, button_onclick, page_prerender (Correct)
3. page_init, button_onclick, page_load, page_prerender
4. page_init, page_load, page_prerender, button_onclick

14) What does the "EnableViewState" property do? Why would I want it on or off?

1. It maintains the state (value) of the web form and controls across multiple server requests. (Correct)
2. It maintains the state (value) of the web form
3. controls across multiple server requests.
4. To hide the controls in web form

15) How to get the url of page dynamically?

1. Use Response.Url
2. Use Server.Url
3. Use Request.Url (Correct)
4. Use Request.WebUI.U

16) What is the primary purpose of Application domain?

1. To isolate application from each other (Correct)

2. To create IP address
3. To place each applications
4. To reduce errors

17) What is the method similar to Response.Redirect that will send variables to the destination page other than using a query string or the post method?

1. Server.Execute()
2. Response.Write()
3. Server.Transfer() (Correct)
4. Response.Output.Write()

18) Which of these string definitions will prevent escaping on backslashes in C#?

1. string s = #”n Test string”; (Correct)

2. string s = “’n Test string”;
3. string s = @”n Test string”;

4. string s = “n Test string”;

19) We have the code like xxx(src As Object, e As EventArgs). Among this what is xxx?

1. Function
2. Constructor
3. Event Handler (Correct)
4. Method

20) Why do I get the error message ''ExecuteReader requires an open and available Connection. The connection's current state is Closed''?

1. This error is caused if you have not opened the connection. (Correct)
2. This error is caused if you are forgot to close the connection
3. This error is caused if you cannot open the connection
4. This error is caused if you have not sufficient permission to open.

21) Which method do you invoke on the DataAdapter control to load your generated dataset with data?

1. Load()
2. Fill() (Correct)
3. DataSource()
4. DataBind()

22) What are the methods present in response objects except response. Redirect ()?

AddHeader Adds a new HTTP header and a value to the HTTP response

AppendToLog Adds a string to the end of the server log entry

BinaryWrite Writes data directly to the output without any character conversion

Clear Clears any buffered HTML output

End Stops processing a script, and returns the current result

Flush Sends buffered HTML output immediately

Redirect Redirects the user to a different URL

Write Writes a specified string to the output

23) How to find out the version of .net framework installed in your system?

Response.Write(System.Environment.Version.ToString());

24) How to find out the version of sqlserver installed in your system?

SELECT @@VERSION as version

25) How to find out the version of sqlserver installed in your system?

SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')

26) How can you automatically generate interface for the remotable object in .NET with Microsoft tools?

1. Use capsol tool
2. Use web Services
3. Use XML
4. Use Soapsuds tool (Correct)

27) What is the most important use of SslStream Class ?

1. Used for Client-Server Communication (Correct)
2. Used for Streaming
3. Used for file accessing
4. Used for Security


28) what is the best way to rename a file on the webserver in code?

1. Using File.Copy()

2. Using File.Move (Correct)
3. Using File.Clone()
4. Using File.Cut()

29) What is the best way to output only time and not Date?

1. Response.Write(DateTime.Now.ToString("dd"));
2. Response.Write(DateTime.Now.ToString();
3. Response.Write(DateTime.Now.ToString("hh:mm:ss"));
4. Response.Write(DateTime.Now.ToString("tt")); (Correct)

30) What is diffgram?

1. HTML formats that you can use to render DataSet object contents to XML

2. XML formats that you can use to render DataSet object contents to XML (Correct)
3. HTML formats that you can use to render DataReader object contents to XML
4. XML formats that you can use to render DataReader object contents to XML

31) Is XML is case sensitive?

1. Yes (Correct)
2. No
3. Can't Say


32) among the below, which one is used for XML documentation comments?

1. //
2. /* */
3. /// (Correct)
4. ////
5. */ /*


33) How to check if nothing is selected in a CheckBoxList without using a loop to parse through all the items?

1. Check if CheckBoxList.SelectedIndex equals to 0
2. Check if CheckBoxList.SelectedIndex equals to -1 (Correct)
3. Check if CheckBoxList.SelectedIndex equals to null
4. Check if CheckBoxList.SelectedIndex equals to > 0

34) How to display full day names in calendar control?

1. Set the DayNameFormat= static for the Calendar Control
2. Set the DayFormat= Full for the Calendar Control
3. Set the DayNameFormat= dynamic for the Calendar Control
4. Set the DayNameFormat= Full for the Calendar Control (Correct)

35) How to reset the selected date in the calendar control?

1. Calendar1.SelectedDates.Clear(); (Correct)
2. Calendar1.SelectedDates.Reset();3.Calendar1.SelectedDates.Remove();
4. Calendar1.SelectedDates.Delete();

36) How can I enforce that only one radiobutton gets selected among a list of Radiobutton controls?

1. Set same Group for the radiobutton controls
2. Set same Groupname for the radiobutton controls (Correct)
3. Set different Group for the radiobutton controls
4. Set different Groupname for the radiobutton controls

37) Where do you store the information about the user’s locale?

1. using System.Web.UI.WebControls;
2. using System.Web.Security;
3. System.Web.UI.Page.Culture (Correct)
4. using System.Data;

38) Can you prevent your class from being inherited by another class?

1. No
2. Yes (Correct)

39) To test a Web service you must create a Windows application or Web application to consume this service?

1. True
2. False (Correct)
3. IsNot Possible

40) What does WSDL stand for?

1. Web Sit Description Language
2. Web Services Description Language (Correct)
3. Web Service Difrent Language

41) Which control would you use if you needed to make sure the values in two different controls matched?

1. CompareValidator (Correct)
2. Rangevalidator

3. ValidationSummary
4. RequiredValidator

42) Which template must you provide, in order to display data in a Repeater control?

1. ItemTemplate. (Correct)
2. AlternatingItemTemplate.
3. above all

43) Can you edit data in the Repeater control?

1. No (Correct)
2. Yes
3. Is not possible

44) What data types do the RangeValidator control support?

1. Integer, String, and Date. (Correct)
2. bit,string
3. object,integer

45) How many languages .NET is supporting now?

3. 44 (Correct)


46) what is the size of an empty class..?

1. 0
2. 1 (Correct)


47) what is hiding?

1. providing new implementation in the derived class which has override keyword in the base class
2. without having override keyword in the base class provide the new implementation in the derived class (Correct)

3. It is similar to overloading

48) what is the output of the following question


using System;

class test
{
static void Main()
{
int i = 5;
object o = i;
Console.WriteLine(o);
}
}

1.object
2. 5 (Correct)
3. Compile time error
4. Run time error

49) In which statement allows the script to add at the end of the body tag

1. RegisterStartupScript (Correct)
2. RegisterClientScriptBlock
3. all
4. none

50) As which html control the viewstate is stored in the page?

1. Text Field
2. Hidden Field (Correct)

3. DropDown List
4. Label with visibility false property

51) How ViewState value is Stored in the page by default

1. plain text
2. encrypted
3. encoded
4. base64 encoding (Correct)

52) --------is the process of making your IL code difficult to read

1. Machine.config
2. Reflection
3. obfuscation (Correct)
4. Filesystemwatcher

53) How we can trace an application by put which string in the web.config
1. trace enabled="true" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" (Correct)

2. trace enabled="true" requestLimit="10" pageOutput="true" traceMode="SortByTime" localOnly="true"

3. trace enabled="false" requestLimit="10" pageOutput="true" traceMode="SortByTime" localOnly="true"

4. all of above

54) D.V.Harinatha reddy wants build a website,in his home page he want to display an image of world by clicking on the country he want to redirect to local website for this we can select which control?


1. Image control
2. Image button
3. Image map control (Correct)
4. any one of above

55) What should the build action be for Nhibernate Xml files?


1. content

2. embedded resource (Correct)
3. text
4. xml

56) How to call javascript function from serverside?for example, a webform has one textbox control named 'txtCity' which accepts only alphabets.For this validation one javascript function is written named acceptChar.How to call acceptchar javascript function from serverside


1. controlname.Attributes.Add("("onkeypress", "acceptChar(' ')")
2. txtCity.Attributes.Add("("onkeypress", "acceptChar(' ')") (Correct)
3. Attributes.Add("("onkeypress", "acceptChar")
4. Attributes.Add("(onkeypress(),"acceptChar")

57) What are the types of web buttons in asp.net 2.0?
1. Submit button (Correct)
2. Command button
3. above 2
4. nonne of above

56) When we are usng HTML server controls than web server controls?

1. Conveting ASP Applications to the ASP.net
2. when control requires more java script
3. above 2 (Correct)
4. not above 2

57) Advantages of asp.net 2.0 compare to the version of 1.1

1. partial classes
2. master page
3. menu controls
4. all of above (Correct)

58) From which page we can find the trace details?

1. trace.aspx
2. trace.ascs
3. trace.axd (Correct)
4. all of above

59) ASP.NET with C# Certification Q

1. // (Correct)
2. /////////////
3. //////
4. //////////

60) From which port service request from browser.

1. 20 (Correct)
2. 21
3. 80
4. 443

61) You are in charge of creating a remote object that will return database records to the caller of the method. You want to keep track of the number of requests. Which activation mode would you use?
A. SingleCall
B. Singleton
C. Client-activated
D. Server-activated
1. A
2. B (Correct)
3. C
4. D

62) How to detect whether a cookie is a normal cookie or a multi-valued cookie

1. Cookie.IsMultivalued
2. HttpCookie.HasKeys (Correct)
3. Cookie.HasKeys
4. HttpCookie.Values
5. HttpCookie.HasValues

63) Which of the Validation has data type property

1. range validation (Correct)
2. Compare Validation
3. Summary VALIDATION
4. REQUIRED FILELD VALIDATION

64) IsClientConnected is a property of

1. Server
2. Response (Correct)
3. Request
4. Session

65) ClientCertificate is a collection of
1. Server
2. Response
3. Request (Correct)
4. ObjectContext

66) View State holds the control value even when I come back after navigating to another page (using Hyperlinks).

1. True
2. False (Correct)
3. Can't Say
4. None of the Above

67) How do you make Sessions not to use cookies?

1. Delete Cookies immediately after page is loaded
2. No, we cannot do this. Sessions will use cookies.
3. Enable cookieless property in Web.config (Correct)
4. None of the above

68) If cookies are disabled in client browser, will session tracking work?

1. No (Correct)
2. yes

3. none

69) What is thr Difference Between Machine.config and Web.config:?

1. Machine.config->Configuration file for all the applications in the system
2. Web.config->Config file for single application.
3. above 2 (Correct)

70) Dataset is faster than Data Grid

1. False (Correct)
2. True
3. Both are same in operation
4. None of the above

71) Trace object is available in which class?

1. System.Diagnostics
2. System.web
3. System.configuration
4. Both A and B (Correct)

72) Where view state variable can stored?

1. client side (Correct)
2. server side
3. In database
4. None of above

73) How many session levels are there?
1. 1
2. 2
3. 3 (Correct)
4. None of above

74) How many number of parameters we can take in Query String ?

1. One
2. Two
3. Four
4. 2086 Characters (Correct)
5. Depends On Browser

0 comments: