27
Trc nghim Asp (chính xác 99.99%) 1. What does ASP stand for? a. All Standard Pages b. A Server Page c. Active Standard Pages d. Active Server Pages 2. ASP server scripts are surrounded by delimiters, which? a. <&>...</&> b. <script>...</script> c. <%>...</%> d. <%...%> 3. How do you write "Hello World" in ASP a. Response.Write("Hello World") b. Document.Write("Hello World") // javascript c. "Hello World" 4. "<%=" is the same as: a. <%Equal b. <%Write c. <%Response.Write d. <%Document.Write 5. What is the default scripting language in ASP? a. JavaScript b. EcmaScript c. PERL d. VBScript 6. How can you script your ASP code in JavaScript? a. Start the document with: <% language="javascript" %> b. JavaScript is the default scripting language c. Start the document with: <%@ language="javascript" %> d. End the document with: <% language="javascript" %> 7. How do you get information from a form that is submitted using the "get" method? a. Request.QueryString // lay gia tri cua bien tu thanh dia chi b. Request.Form 8. How do you get information from a form that is submitted using the "post" method? a. Request.Form // ten bien ko hien tren thanh dia chi b. Request.QueryString 9. Page 1 has this link: <a href="page2.asp?color=green">Go</a> How can page2.asp get the "color" parameter? a. Get("color") b. Request.QueryString("color") c. Response.Parameter("color") d. Response.QueryString("color") 10. Which ASP property is used to identify a user? a. The Application object b. An ASP Cookie

Trac Nghiem Web

Embed Size (px)

DESCRIPTION

Trac nghiem web

Citation preview

Page 1: Trac Nghiem Web

Trắc nghiệm Asp (chính xác 99.99%)

1. What does ASP stand for? a. All Standard Pages b. A Server Page c. Active Standard Pages d. Active Server Pages

2. ASP server scripts are surrounded by delimiters, which? a. <&>...</&> b. <script>...</script> c. <%>...</%> d. <%...%>

3. How do you write "Hello World" in ASP a. Response.Write("Hello World") b. Document.Write("Hello World")  // javascript c. "Hello World"

4. "<%=" is the same as: a. <%Equal b. <%Write c. <%Response.Write d. <%Document.Write

5. What is the default scripting language in ASP? a. JavaScript b. EcmaScript c. PERL d. VBScript

6. How can you script your ASP code in JavaScript? a. Start the document with: <% language="javascript" %> b. JavaScript is the default scripting language c. Start the document with: <%@ language="javascript" %> d. End the document with: <% language="javascript" %>

7. How do you get information from a form that is submitted using the "get" method? a. Request.QueryString  // lay gia tri cua bien tu thanh dia chi b. Request.Form

8. How do you get information from a form that is submitted using the "post" method? a. Request.Form  // ten bien ko hien tren thanh dia chi b. Request.QueryString

9. Page 1 has this link: <a href="page2.asp?color=green">Go</a> How can page2.asp get the "color" parameter? a. Get("color") b. Request.QueryString("color") c. Response.Parameter("color") d. Response.QueryString("color")

10. Which ASP property is used to identify a user? a. The Application object b. An ASP Cookie

Page 2: Trac Nghiem Web

c. The Server object 11. All users of the same application share ONE Session object.

a. False b. True

12. All users of the same application share ONE Application object. a. True b. False

13. If a user has Cookies enabled, a session variable is available to all pages in one application. a. False b. True

14. Global.asa is required for all Web sites a. Only for ASP Web sites b. True c. False

TRẮC NGHIỆM ASP.NET (99 CÂU)

1. Which of the following languages can be used to write server side scripting in ASP.NET? A) C# B) C C) Visual Basic

2. The Following are the minimum requirement to run Asp.net pages A) Java Virtual Machine B) Common Language Runtime C) Windows explorer

3. When a .aspx page is requested from the web server, the out put will be rendered to browser in following format. A) HTML B) XML C) WML

4. What executable unit gets created when we build an ASP.Net application? A) . EXE B) . DLL C) . COM

5. The best way to delimit ASP.Net code from HTML code in your pages is by using --------------- tags. A) < Body > B) < Head > C) < Script >

6. The code will be processed on web server when the runat attribute of the < Script > tag has the following value. A) Desktop B) Client C) Server

7. The Asp.net server control, which provides an alternative way of displaying text on web page, is A) < asp:label > B) < asp:listitem > C) < asp:button >

8. asp:dropdownlist> tag replaces which of the HTML tags A) < Option >

Page 3: Trac Nghiem Web

B) < Select > C) < List >

9. The first event to be triggered in an aspx page is A) Page_Load() B) Page_Init() C) Page_click()

10. Postback occurs in which of the following forms A) Winforms B) HTMLForms C) Webforms

11. what namespace does the Web page belong in the .NET Framework class hierarchy? A) System.web.UI.Page B) System.Windows.Page C) System.Web.page

12. Which method do you invoke on the Data Adapter control to load your generated dataset A) Fill ( ) B) ExecuteQuery ( ) C) Read ( )

13. How many configuration files can an ASP.NET projects have? A) One B) More Than One C) None

14. How do you register a user control? A) Add Tag prefix, Tag name B) Add Source, Tag prefix C) Add Src, Tagprefix, Tagname

15. How do you post the current page to a different aspx page ? A) FORM ACTION="actiopage.aspx" RUNAT="server" method="post" B) FORM ACTION="actiopage.aspx" method="post" C) FORM id="Form1" method="post" runat="server"

16. Which of these namespaces used for FileAccess A) System.IO B) System.IO.IsolatedStorage C) System.DirectoryServices D) All of these

17. Which of the following is true ? A) User controls are displayed correctly in the Visual Studio .NET Designer B) Custom controls are displayed correctly in VS.Net Designer C) User and Custom controls are displayed correctly in the Visual Studio .NET Designer.

18. Can a dll run as stand alone application ? A) No B) Yes C) Sometimes we can make it by introducing some code

19. To add a custom control to a Web form we have to register with A) TagPrefix B) Name space of the dll that is referenced C) Assemblyname D) All of the above

Page 4: Trac Nghiem Web

20. Custom Controls are derived from which of the classes A) System.Web.UI.Webcontrol B) System.Web.UI.Customcontrol C) System.Web.UI.Customcontrols.Webcontrol

21. A web application running on multiple servers is called as A) WebForm B) Webfarm C) Website

22. What is the transport protocol used to call a webservice A) HTTP B) SOAP C) TCP D) SMTP

23. How ASP.Net Different from ASP A) Scripting is separated from the HTML, Code is interpreted seperately B) Scripting is separated from the HTML, Code is compiled as a DLL, the DLLs can be executed on server C) Code is separated from the HTML and interpreted Code is interpreted separately

24. What’s the difference between Response.Write() andResponse.Output.Write()? A) Response.Output.Write() allows you to flush output B) Response.Output.Write() allows you to buffer output C) Response.Output.Write() allows you to write formatted output D) Response.Output.Write() allows you to stream output

25. Why is Global.asax is used A) Implement application and session level events B) Declare Global variables C) No use

26. There can be more than 1 machine.config file in a system A) True B) False

27. What is the extension of a web user control file ? A) .Asmx B) . Ascx C) .Aspx

28. What is the default session out time A) 20 Sec B) 20 Min C) 1 hr

29. Which of the following is true ? A) IsPostBack is a method of System.UI.Web.Page class B) IsPostBack is a method of System.Web.UI.Page class C) IsPostBack is a readonly property of System.Web.UI.Page class

30. It is possible to set Maximum length for a text box through code A) True B) False

31. The number of forms that can be added to a aspx page is A) 2 B) 3 C) 1 D) More than 3

Page 5: Trac Nghiem Web

32. How do you manage states in asp.net application A) Session Objects B) application Objects C) Viewstate D) Cookies E) All of the above

33. what is the difference between user control and custom control A) Both can use as drag and drop tool B) Both are same C) Both can use different application D) One Custom Control can be use in different project but not the same with User control

34. The interface used by ASP.Net to create Unique Id’s? A) AppDomainsetup B) System.UI.Naming.Container C) IAsyncResult D) customFormatter

35. Which property of the session object is used to set the local identifier ? A) SessionId B) LCID C) Item D) Key

36. Select the caching type supported by ASP.Net A) Output Caching B) DataCaching C) Both a & b D) None of the above

37. Where is the default Session data is stored in ASP.Net A) InProcess B) StateServer C) SQL Server D) All of the above

38. How do you disable client side validation ? A) Set the language property to C# B) Set the Runat property to server C) Set the ClientTarget property to Downlevel D) Set the inherits property to codeb

39. Select the validation control used for “PatternMatching” A) FieldValidator B) RegularExpressionValidator C) RangeValidator D) PatternValidator

40. How do you trace the application_End event on runtime? A) By Debugging B) By Tracing C) Can not be done

41. How do you turn off the Session state for a webform ? A) In Web.config file set the tag to True B) In Web.config file set the tag to false

Page 6: Trac Nghiem Web

C) Set the Session state to false in webform properties window D) Set the EnableSession state to false in webform properties window

42. Who can access Session state variables A) All Users of an application B) A Single session C) All users within a single tunnel

43. Select the type Processing model that asp.net simulate A) Event-driven B) Static C) Linear D) TopDown

44. Does the “EnableViewState” allows the page to save the users input on a form A) Yes B) No

45. Web Controls Supports CSS A) True B) False

46. Session Object classes are defined in which of the following namespace? A) System.Web.UI B) System.Web.SessionState C) System.Web

47. Which DLL translate XML to SQL in IIS A) SQLISAPI.dll B) SQLXML.dll C) LISXML.dll D) SQLIIS.dll

48. What is the default authentication mode for IIS A) Windows B) Anonymous C) Basic Authentication D) None

49. Which of the following is not a valid state management tool? A) Application State B) Hidden Form Field C) Querystate D) Cookies

50. What is the maximum number of cookies that can be allowed to a web site A) 1 B) 10 C) 20 D) 30 E) More than 30

51. Select the control which does not have any visible interface A) Datalist B) DropdownList C) Repeater D) Datagrid

52. How do you explicitly kill a user’s session ? A) Session.Close ( )

Page 7: Trac Nghiem Web

B) Session.Discard ( ) C) Session.Abandon D) Session.End

53. Why do we use XMLSerializer class A) Remoting B) WebServices C) Xml documentary Files

54. What does Response.End will do? A) It will stop the server process B) It will stop the client process C) None of the above

55. Which control supports paging A) Repeater B) Datagrid C) Both D) None

56. Where do you store the information about the user locale A) System.user B) System.web C) System.Drawing D) System.Web.UI.Page.Culture

57. What is the purpose of code behind ? A) To separate different sections of a page in to different files B) To merge HTML layout and code in to One file C) To separate HTML Layout and code to different file D) To ignore HTML usage

58. What is a satallite assembly ? A) Any DLL file used by an EXE file. B) An Assembly containing localized resources for another assembly C) None of the above

59. Whch of the following is not a member of Response Object? A) Clear B) Write C) Execute D) Flush

60. The object used by SQL connection to make Security Demands A) SQLLCientAttribute B) SQLPermission C) SQLPermissionClient D) SQLClientPermission

61. Which of the following is not a member of ADODBCommand object A) ExecuteReader B) ExecuteScalar C) Open D) CommandText

62. Which method do you invoke on the DataAdapter control to load your generated dataset with data? A) Load B) Fill

Page 8: Trac Nghiem Web

C) GetAll D) None

63. How to open more than one datareader at a time A) Use different datareader variable B) Use different datareader and connection variable C) Can not be done

64. What is the advantage of Disconnected mode of ADO.Net in ASP.Net A) Automatically dump data at client PC B) Not necessary to connect with server C) user data can update and retrieve in dataset and when connection connected, update values with server D) All of the above

65. Which objects is used to create foreign key between tables? A) DataRelation B) DataRelationship C) DataConstraint D) Datakey

66. Which one of the following namespaces contains the definition for IdbConnection A) System.Data.Interfaces B) System.Data.Common C) System.Data D) System.Data.Connection

67. Select the Interface which provides Fast, connected forward-only access to data A) IdataRecord B) Idatabase C) IdataReader D) Irecorder

68. How do we Delete, Update, Select data in a Dataset A) Using SQLDataAdapter B) Using SQLDataReader C) Using SQLCommand D) None

69. Which of the following is not a member of ConnectionObject A) BeginTransaction B) EndTransaction C) Execute D) Open

70. Is it Possible to Serialize HashTable with XMLSerializer A) Yes B) No

71. What is the Full Form of WSDL A) Web System Description Language B) Web Services Detail Language C) Web Service Description Language D) None

72. What is the difference between Server.Transfer & Response.Redirect A) No Difference B) Server.Transfer needs a roundtrip, Response.Redirect does not C) Response.Redirect needs roundtrip, Server.Transfer does not D) Server.Transfer can transfer user between 2 applicaions

Page 9: Trac Nghiem Web

73. Which Language can Support SOAP A) VB B) JAVA C) COBOL D) All of the above

74. What is the size of the session ID A) 32 bit long string B) 32 bit long double C) 32 bit long character D) 32 bit long integer

75. Which of the following extension does a webservice file will have A) .Asmx B) .Aspx C) .Ascx D) .Resx

76. What is a strong name? A) Public Key B) Private Key C) Combination Of both Public,Private key and digital signature

77. What is the purpose of Reflection? A) For Reading metadata at runtime B) For knowing version of assembly C) For finding path of an assembly

78. Is it possible edit data in a repeater control A) No B) Yes

79. Why is Global.asax is used for ? A) To implement application & Session level events B) To store configuration information C) To store styling information D) None of the above

80. What is a diffgram ? A) The one which renders the dataset object contents to XML B) Finds the difference in two objects C) Finds the difference in two files D) None of the above

81. What is the lifespan for items stored in viewstate A) Exists for the Life of the current page B) 20 mins C) 2 mins D) 2 sec

82. What data types do a Rangevalidator supports A) Integer B) String C) Date D) All of the above

83. Select the output of the statement < form method=post action=”test.aspx” > A) Transfers all the form data to test.aspx with HTTP headers B) Transfers all the form data to test.aspx with out HTTP headers

Page 10: Trac Nghiem Web

C) Calls post method on test.aspx D) None of the above

84. What is the out put of the following codebyte a=200;byte b=100;byte c=a+b;Response.Write ( C ); A) 300 B) Compile Time error C) Run time Error D) Just prints “C”

85. What is the out put of Following codeString a=”Hello”;String b=”World”String c= a+bResponse.Write ( “C “); A) Hello world B) C C) A+b D) None of the above

86. Whats the significance of Request.MapPath( ) A) Maps the specified virtual path to a physical path B) Maps the specified absolute path to virtual path C) None

87. Which of the following are not a member of Server Object A) Execute B) Transfer C) Open D) HTMLDecode

88. What is the significance of Server .MapPath A) Returns the physical file path that corresponds to virtual specified path B) Returns the Virtual Path of the web folder C) Maps the specified virtual path to Physical path D) None

89. What is the Server.MachineName does A) Gets the Server’s Machine Name B) Gets the Referred Web site name on the server C) Gets the Client Machine Name D) None

90. Whats is the significance of Response.ClearHeaders( ) A) Clears all Headers from the buffer stream B) Clears all the section value from rendered HTML File C) Clears the content of the Rendered page D) None of the above

91. What is the significance of Response.AddHeaders( ) A) Adds HTTP Headers to output stream B) Adds Tag to rendered Page C) Add Headers to the web site

92. What is the difference between HTTP handlers & HTTP modules A) Httphandler is an class and Httpmodule is an assembly B) Httphandler is an event handler and httpmodule is module to do some task C) Both of the above D) None of the above

93. Which namespace allows us to formauthentication ? A) System.Web.Ui.Forms.Security B) System.Web.Security

Page 11: Trac Nghiem Web

C) System.Web.Configuration D) System.Web.Services

94. Which method displays the custom control A) The Prerender B) Render C) Page_Load D) Display

95. When is the user controls code is executed A) After the webform loads B) After the page_init event of webform C) Before Page_init event of web form

96. Client Sertificate is a collection of A) Server B) Response C) Collection D) Request

97. What section of the config.Web file is used for storing a list of authorized users? A) 1 B) 3 C) 4 D) None

98. What version of the javascript should be used for client side script A) 1.0 B) 1.1 C) 2.0 D) 3

99. How do you add ASP.Net 3rd party component A) By add/Remove items in the project menu B) Add reference of dll file and place the code where ever required C) Cannot add 3rd party component to asp.net Đây là đáp án của toàn bộ cư dân mạng: xác suất đúng > 95%

1C 2B 3A 4B 5C 6C 7A 8B 9B 10C 11A 12A 13B 14C 15A 16A 17B 18B 19D 20B 21B 22C 23B 24C 25A 26B 27B 28B 29C 30A 31C 32E 33D 34B 35B 36C 37A 38C 39B 40B 41D 42A 41D 44A 45A 46B 47A 48B 49C 50C 51C 52C 53B 54A 55B 56D 57C 58B 59C 60B 61C 62B 63C 64D 65A 66C 67C 68A 69C 70B 71C 72C 73D 74A 75A 76C 77A 78A 79A 80A 81A 82D 83C 84B 85B 86A 87C 88A 89A 90A 91A 92D 93B 94B 95C 96D 97C 98C 99B

Trắc nghiệm css ( Chính xác 100%)

1. What does CSS stand for? a. Colorful Style Sheets b. Creative Style Sheets

Page 12: Trac Nghiem Web

c. Computer Style Sheets d. Cascading Style Sheets

2. What is the correct HTML for referring to an external style sheet? a. <style src="mystyle.css"> b. <link rel="stylesheet" type="text/css" href="mystyle.css"> c. <stylesheet>mystyle.css</stylesheet>

3. Where in an HTML document is the correct place to refer to an external style sheet? a. At the end of the document b. In the <body> section c. In the <head> section d. At the top of the document

4. Which HTML tag is used to define an internal style sheet? a. <style> b. <css> c. <script>

5. Which HTML attribute is used to define inline styles? a. Styles b. Font c. Class d. Style

6. Which is the correct CSS syntax? a. {body;color:black} b. {body:color=black(body} c. body:color=black d. body {color: black}

7. How do you insert a comment in a CSS file? a. // this is a comment b. ' this is a comment c. // this is a comment // d. /* this is a comment */

8. Which property is used to change the background color? a. bgcolor: b. color: c. background‐color:

9. How do you add a background color for all <h1> elements? a. h1 {background‐color:#FFFFFF} b. h1.all {background‐color:#FFFFFF} c. all.h1 {background‐color:#FFFFFF}

10. How do you change the text color of an element? a. text‐color= b. text‐color: c. fgcolor: d. color:

11. Which CSS property controls the text size? a. font‐size b. font‐style c. text‐style

Page 13: Trac Nghiem Web

d. text‐size 12. What is the correct CSS syntax for making all the <p> elements bold?

a. <p style="font‐size:bold"> b. <p style="text‐size:bold"> c. p {font‐weight:bold} d. p {text‐size:bold}

13. How do you display hyperlinks without an underline? a. a {text‐decoration:none} b. a {underline:none} c. a {text‐decoration:no underline} d. a {decoration:no underline}

14. How do you make each word in a text start with a capital letter? a. text‐transform:uppercase b. text‐transform:capitalize c. You can't do that with CSS

15. How do you change the font of an element? a. f: b. font= c. font‐family:

16. How do you make the text bold? a. font‐weight:bold b. style:bold c. font:b

17. How do you display a border like this: The top border = 10 pixels The bottom border = 5 pixels The left border = 20 pixels The right border = 1pixel? a. border‐width:10px 20px 5px 1px b. border‐width:10px 5px 20px 1px c. border‐width:5px 20px 10px 1px d. border‐width:10px 1px 5px 20px 

18. How do you change the left margin of an element? a. indent: b. margin‐left: c. text‐indent: d. margin: 

19. To define the space between the element's border and content, you use the padding property, but are you allowed to use negative values? a. No b. Yes

20. How do you make a list that lists its items with squares? a. list‐type: square b. list‐style‐type: square c. type: square d. type: 2

Page 14: Trac Nghiem Web

Trắc nghiệm HTML (20 câu)

1. What does HTML stand for? a. Hyper Text Markup Language b. Hyperlinks and Text Markup Language c. Home Tool Markup Language

2. Who is making the Web standards? a. Mozilla b. The World Wide Web Consortium c. Microsoft

3. Choose the correct HTML tag for the largest heading a. <h1> b. <head> c. <h6> d. <heading>

4. What is the correct HTML tag for inserting a line break? a. <break /> b. <br /> c. <lb />

5. What is the correct HTML for adding a background color? a. <background>yellow</background> b. <body style="background-color:yellow"> c. <body background="yellow">

6. Choose the correct HTML tag to make a text bold a. <bold> b. <b>

7. Choose the correct HTML tag to make a text italic a. <i> b. <italic>

8. What is the correct HTML for creating a hyperlink? a. <a name="http://www.w3schools.com">W3Schools.com</a> b. <a>http://www.w3schools.com</a> c. <a href="http://www.w3schools.com">W3Schools</a> d. <a url="http://www.w3schools.com">W3Schools.com</a>

9. How can you create an e-mail link? a. <mail>xxx@yyy</mail> b. <mail href="xxx@yyy"> c. <a href="mailto:xxx@yyy"> d. <a href="xxx@yyy">

10. How can you open a link in a new browser window? a. <a href="url" target="_blank"> b. <a href="url" target="new"> c. <a href="url" new>

11. Which of these tags are all <table> tags? a. <table><head><tfoot> b. <thead><body><tr> c. <table><tr><tt> d. <table><tr><td>

12. Choose the correct HTML to left-align the content inside a tablecell?

Page 15: Trac Nghiem Web

a. <tdleft> b. <td align="left"> c. <td leftalign> d. <td valign="left">

13. How can you make a list that lists the items with numbers? a. <ol> b. <list> c. <dl> d. <ul>

14. How can you make a list that lists the items with bullets? a. <ol> b. <ul> c. <dl> d. <list>

15. What is the correct HTML for making a checkbox? a. <checkbox> b. <input type="checkbox" /> c. <input type="check" /> d. <check>

16. What is the correct HTML for making a text input field? a. <textinput type="text" /> b. <textfield> c. <input type="textfield" /> d. <input type="text" />

17. What is the correct HTML for making a drop-down list? a. <select> b. <list> c. <input type="list" /> d. <input type="dropdown" />

18. What is the correct HTML for making a text area? a. <input type="textbox" /> b. <input type="textarea" /> c. <textarea>

19. What is the correct HTML for inserting an image? a. <img src="image.gif" /> b. <img href="image.gif /> c. <img>image.gif</img> d. <image src="image.gif" />

20. What is the correct HTML for inserting a background image? a. <body background="background.gif"> b. <img src="background.gif" background /> c. <background img="background.gif">

Trắc nghiệm javascript

1. Inside which HTML element do we put the JavaScript? a. <scripting> b. <script>

Page 16: Trac Nghiem Web

c. <javascript> d. <js>

2. What is the correct JavaScript syntax to write "Hello World"? a. document.write("Hello World") b. "Hello World" c. response.write("Hello World") d. ("Hello World")

3. Where is the correct place to insert a JavaScript? a. The <body> section b. The <head> section c. Both the <head> section and the <body> section are correct

4. What is the correct syntax for referring to an external script called "xxx.js"? a. <script src="xxx.js"> b. <script href="xxx.js"> c. <script name="xxx.js">

5. An external JavaScript must contain the <script> tag a. False b. True

6. How do you write "Hello World" in an alert box? a. alertBox("Hello World") b. alert("Hello World") c. alertBox="Hello World" d. msgBox("Hello World")

7. How do you create a function? a. function myFunction() b. function=myFunction() c. function:myFunction()

8. How do you call a function named "myFunction"? a. myFunction() b. call myFunction() c. call function myFunction

9. How do you write a conditional statement for executing some code if "i" is equal to 5? a. if i==5 then b. if i=5 then c. if i=5 d. if (i==5)

10. How do you write a conditional statement for executing some code if "i" is NOT equal to 5? a. if (i <> 5) b. if <>5 c. if =! 5 then d. if (i != 5)

11. How does a "while" loop start? a. while i=1 to 10 b. while (i<=10;i++) c. while (i<=10)

12. How does a "for" loop start? a. for i = 1 to 5 b. for (i = 0; i <= 5; i++) c. for (i <= 5; i++)

Page 17: Trac Nghiem Web

d. for (i = 0; i <= 5) 13. How can you add a comment in a JavaScript?

a. //This is a comment b. 'This is a comment c. <!--This is a comment-->

14. What is the correct JavaScript syntax to insert a comment that has more than one line? a. //This comment has

more than one line// b. <!--This comment has

more than one line--> c. /*This comment has

more than one line*/ 15. What is the correct way to write a JavaScript array?

a. var txt = new Array(1:"tim",2:"kim",3:"jim") b. var txt = new Array("tim","kim","jim") c. var txt = new Array="tim","kim","jim" d. var txt = new Array:1=("tim")2=("kim")3=("jim")

16. How do you round the number 7.25, to the nearest integer? a. Math.rnd(7.25) b. Math.round(7.25) c. rnd(7.25) d. round(7.25)

17. How do you find the number with the highest value of x and y? a. Math.ceil(x,y) b. top(x,y) c. Math.max(x,y) d. ceil(x,y)

18. What is the correct JavaScript syntax for opening a new window called "w2" ? a. w2=window.new("http://www.w3schools.com"); b. w2=window.open("http://www.w3schools.com");

19. How do you put a message in the browser's status bar? a. tatus("put your message here") b. window.status("put your message here") c. statusbar = "put your message here" d. window.status = "put your message here"

20. How can you find a client's browser name? a. client.navName b. browser.name c. navigator.appName

Đáp án dưới đây chính xác 99.99%

1b 2a 3c 4a 5a 6b 7a 8a 9d 10d11c 12 13a 14c 15b 16b 7c 19d c b 1 18b 20 

Page 18: Trac Nghiem Web

1 You are a junior web designer. Your company assigns you to work on a JavaScript project. Which of the following are the advantages of using JavaScript for form validation? Increased validity of form submission Conservation of bandwidth Increase end-user satisfaction All of the above

2 Your company assigns you to work on a JavaScript project. With the DATE object, which of the following allows you to call a function based on an elapsed time? setElapsedTime()Timeout()setTimeout()setTime()

3 You are working on a JavaScript project. What is used to restart the inner most loop? Abort Breakloop Stop Continue label

4 You work on a JavaScript project. Which of the following correctly describe the relationships of JavaScript and "objects"? JavaScript is Object-oriented JavaScript is Object-based JavaScript is Object-driven JavaScript has no relationship with objects

5 You work on a JavaScript project. How do you prompt users with messages and at the same time requesting user inputs? Alert()Display()Prompt()Confirm()

6 Which of the following is the correct syntax of FOR?for ( increment; initialize; test) for ( initialize; test), increment for ( initialize; test; increment) for ( test; initalize; increment)

7 In your JavaScript code, how do you find out which character occurs at the 5th position in a string "How are you"? Substring()String()Stringlength()CharAt()

8 Which of the following do you use for a multi-way branch?If Ifthen Ifelse switch

9 You want to design a form validation mechanism. Using string methods, which of the following are the steps involved ?Check for the presence of certain characters

Page 19: Trac Nghiem Web

Check the position of substrings Test the length of data Either a,b,c

10 Which of the following is the minimum browser version that supports JavaScript Navigator v2.0 *Mozilla V1.5 IE 2.0Navigator V1.0

11 Which of the following are the valid JavaScript versions?Version 1.2 Version 1.3 Version 1.4 All of the above *

12 Which of the following languages will you consider as being similar to JavaScript?DelphiC++Pascal *PHP

13 You plan the coding of your project. When must the object references be ready? at run time at compile time at debug time at code time

14 Which of the following correctly describe cookies ?Often referred to as "persistent cookies" Often referred to as "persistent HTML" Small memory-resident pieces of information sent from a server to the client Small memory-resident pieces of information sent from a client to the server Either AB&C

15 A program written by JavaScript is driven byEvents Classes Objects Components

16 What are JavaScript relations with the underlying operating platform? Platform dependent Platform linkage Platform independent Platform binding

17 When you plan for the JavaScript variable names, the first character must be?Underscore Comma Letter Either A&D

18 Which of the following correctly describe JavaScript as a language? It is based on object creation It focuses on component building It focuses on logic flow

Page 20: Trac Nghiem Web

It emphasis on SCRIPTING 19 When authoring web page with Javascript, why should you explicitly include

the window object into your codes? this is a good practice this is a good practice this ensures browser compatibility this ensures OS compatibility

20 Inside which HTML element do we put the JavaScript?<scripting><javascript><script><js>

21 What is the correct JavaScript syntax to write "Hello World"?response.write("Hello World")document.write("Hello World")("Hello World")echo("Hello World")

22 How do you call a function named "myFunction"?call function myFunction myFunction()call myFunction()exec function myFunction

23 How do you write a conditional statement for executing some statements only if "i" is equal to 5?if i==5 thenif i=5 thenif (i==5)if i=5

24 How do you write a conditional statement for executing some statements only if "i" is NOT equal to 5?if (i <> 5)if (i != 5)if =! 5 thenif <> 5

25 How many different kind of loops are there in JavaScript?Two. The "for" loop and the "while" loopFour. The "for" loop, the "while" loop, the "do...while" loop, and the "loop...until" loopOne. The "for" loop None of the above

26 How does a "for" loop start?for (i = 0; i <= 5)for (i = 0; i <= 5; i++)for i = 1 to 5for (i <= 5; i++)

27 What is the correct way to write a JavaScript array?var txt = new Array(1:"tim",2:"shaq",3:"kobe")var txt = new Array="tim","shaq","kobe"var txt = new Array("tim","shaq","kobe") all of the above are incorrect

28 How do you round the number 8.25, to the nearest whole number?

Page 21: Trac Nghiem Web

Math.rnd(8.25)Math.round(8.25) round(8.25)rnd(8.25)

29 How do you find the largest number of 6 and 8?Math.max(6,8)top(6,8)ceil(6,8)Math.ceil(6,8)

30 What is the correct JavaScript syntax for opening a new window called "window5" ?new("http://www.ex-designz.net","window5")window.open("http://www.ex-designz.net","window5")open.newwindow("http://www.ex-designz.net","window5")new.window("http://www.ex-designz.net","window5")

31 How do you put a message in the browser's status bar?window.status = "put your message here"statusbar = "put your message here"status("put your message here")window.status("put your message here")

32 How do you find the client's browser name?browser.namenavigator.appNameclient.navNameNone of the above

33 You define an array usingvar myarray = new Array();var myarray = array new;var new Array() = myarray;var new array = myarray;

34 Onclick is equivalent to which two events in sequenceonmouseover and onmousedownonmousedown and onmouseoutonmousedown and onmouseuponmouseup and onmouseout

35 Which best describe void?A methodA functionAn operatorA statement

36 Which property would you use to redirect visitor to another page?window.location.hrefdocument.hrefjava.redirect.urllink.redirect.href

1 What does ASP stand for?a Active Standard Pagesb A Server Pagec Active Server Pages

Page 22: Trac Nghiem Web

d All Standard Pages2 ASP server scripts are surrounded by delimiters, which?

a <&>...</&>b <%...%>c <%>...</%>d <script>...</script>

3 How do you write "Hello World" in ASP (ASP NET)a Response.Write("Hello World");b Document.Write("Hello World");c System.io.println("Hello World");d Print("Hello World");

4 "<%=" is the same as:a <%Response.Writeb <%Document.Writec <%Writed <%Equal

5 What server-language can be used in ASP.Net ?a C Shellb PERLc Javad VB NET

6 How do you get information from a form that is submitted using the "get" method?a Request.Formb Request.QueryStringc Request.Getd all a,b,c are correct

7 Page 1 has this link: <a href="page2.aspx?color=green">Go</a>How can page2.aspx.cs get the "color" parameter?

a Response.Parameter("color");b Request.QueryString("color");c Response.QueryString("color");d Get("color");

8 Which ASPX object is used to identify a user?Application ObjectServer ObjectSession ObjectBrowser Objejec

9 All users of the same application (website) share ONE Session object ? And share ONE Application?TRUE, TRUETRUE, FALSEFALSE, TRUEFALSE, FALSE

10 In one application (website), one SESSION object is availableAll users, all pagesAll user, Home-page onlyOne user, all pagesOne user, Home-page only

11 In one application (website), one APPLICATION object is available

Page 23: Trac Nghiem Web

All users, all pagesAll user, Home-page onlyOne user, all pagesOne user, Home-page only

12 Which one of these events is a standard Global.asax event?Session_idSession_StartApplication_OnEndGlobal.asax doesn't have any standard events

13 Which one of these events is a standard Global.asax event?Session_OnEndApplication_ErrorAppication_OnStartGlobal.asax doesn't have any standard events

14 Global.asax is required for all Web sitesTRUEFALSE

ASP website, and APSX websiteonly for APSX website

15 Which of the following languages can be used to write server side scripting in ASP.NET?C-sharp VB C++ a and b

16 When an .aspx page is requested from the web server, the out put will be rendered to browser in following format.HTML XML WML JSP

17 The Asp.net server control, which provides an alternative way of displaying text on web page, is< asp:label > < asp:listitem > < asp:button > none of them

18 The first event to be triggered in an aspx page is.Page_Load() Page_Init() Page_Click()Page_Start()

19 Postback occurs in which of the following forms.Winforms HTMLForms Webforms None of them

20 What namespace does the Web page belong in the .NET Framework class hierarchy?System.web.UI.Page System.Windows.Page

Page 24: Trac Nghiem Web

System.Web.page All of them

21 Which method do you invoke on the Data Adapter control to load your generated dataset?Fill( ) ExecuteQuery( ) Read( ) ExecuteSql( )

22 How do you register a user control?Add Tag prefix, Tag name Add Source, Tag prefix Add Src, Tagprefix, Tagname none of them

23 Which of the following is true?User controls are displayed correctly in the Visual Studio .NET Designer Custom controls are displayed correctly in VS.Net Designer User and Custom controls are displayed correctly in the Visual Studio .NET Designer.All of them are FALSE

23b To add a custom control to a Web form we have to register with. TagPrefix Name space of the dll that is referenced Assemblyname All of the above

24 Custom Controls are derived from which of the classesSystem.Web.UI.Webcontrol System.Web.UI.Customcontrol System.Web.UI.Customcontrols.Webcontrol None of them

25 How ASP.Net Different from classic ASP?Scripting is separated from the HTML, Code is interpreted seperately Scripting is separated from the HTML, Code is compiled as a DLL, the DLLs can be executed on server Code is separated from the HTML and interpreted Code is interpreted separatelyAll are incorrect

26 What's the difference between Response.Write() andResponse.Output.Write()?Response.Output.Write() allows you to flush output Response.Output.Write() allows you to buffer output Response.Output.Write() allows you to write formatted output Response.Output.Write() allows you to stream output

27 Why is Global.asax is used?Implement application and session level events Declare Global variables To calculate number visitorsNo use

28 What is the extension of a web user control file?.Asmx .Ascx .Aspx .cs

29 Which of the following is true?

Page 25: Trac Nghiem Web

IsPostBack is a method of System.UI.Web.Page class IsPostBack is a method of System.Web.UI.Page class IsPostBack is a readonly property of System.Web.UI.Page class All above are FALSE

30 The number of forms that can be added to a aspx page is.123

More than 331 How do you manage states in asp.net application

Session Objects Application Objects Viewstate All of the above

32 Which property of the session object is used to set the local identifier?SessionId LCID Item Key

33 Select the caching type supported by ASP.NetOutput Caching DataCachinga and bnone of the above

34 Where is the default Session data is stored in ASP.Net?InProcess StateServer Session Object all of the above

35 Select the type Processing model that asp.net simulateEvent-driven Static Linear Topdown

36 Does the EnableViewState allows the page to save the users input on a form?Yes No

37 Which DLL translate XML to SQL in IIS?SQLISAPI.dll SQLXML.dll LISXML.dll SQLIIS.dll

38 What is the maximum number of cookies that can be allowed to a web site?1

1020

More than 30 39 Select the control which does not have any visible interface

Page 26: Trac Nghiem Web

Datalist DropdownList Repeater Datagrid

40 How do you explicitly kill a user session?Session.Close( ) Session.Discard( ) Session.Abandon Session.End

41 Which of the following is not a member of ADODBCommand object?ExecuteReader ExecuteScalar OpenCommandText

42 Which one of the following namespaces contains the definition for IdbConnection?a System.Data.Interfacesb System.Data.Common c System.Data d System.Data.Connection

43 What important standard is used to connect client browsers with web servers ?HTTPTCP/IPASP.NETHTML

44 What ASP.NET object is used to get information about the web servers ?The Server objectThe Application objectThe Request objectThe Response object

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

46 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 registrationA protected class member for the controlA default event handler for the click eventA default class that inherits from the control’s base class

47 What attribute must be set on a validator control for the validation to work ?ValidateValidateControlControlToBindControlToValidate

48 What HTML element is the asp:Label control rendered as when the target is Internet Explorer ?<label>

Page 27: Trac Nghiem Web

49

50

51

52<label><span><div><table>

53 What method must be overridden in a custom control ?The Paint() methodThe Control_Build() methodThe Render() methodThe default constructor

54 What is used to validate complex string patterns like an e-mail address ?Extended expressionsRegular expressionsIrregular expressionsBasic expressions

<span><div><table>Given an ASP.NET Web Form called WebForm1, what class does the WebForm1 class inherit from by default ?System.Web.FormSystem.Web.GUI.PageSystem.Web.UI.PageSystem.Web.UI.FormWhat is the Web.config file used for ?To store the global information and variable definitions for the applicationConfigures the time that the server-side codebehind module is calledTo configure the web serverTo configure the web browserAfter capturing the SelectedIndexChanged event for a ListBox control, you find that the event handler doesn’t execute. What could the problem be ?The AutoEventWireup attribute is set to FalseThe AutomaticPostBack attribute is set to FalseThe codebehind module is not properly compiledThe ListBox must be defined WithEventsWhat HTML element is the asp:Label control rendered as when the target is Netscape Communicator ?