A set of asp.net interview questions

Source: Internet
Author: User

Multiple choice questions (14 questions in total, one choice or Multiple choices ):
1. An HTML document must contain three elements: head, html, and ().
A. scriptB. bodyC. titleD. link
2. Which of the following javascript code prompts a prompt box? ()
A.doc ument. alert (test)
B. window. alert (test)
C.doc ument. alert ('test ')
D. window. alert ('test ')
3. When the mouse is placed on a link, the css style should be defined by a pseudo class.
A. a: visitedB. a: linkC. a: hoverD. a: active
4. Which of the following statements about the code hidden files in ASP. NET is true ().
A. The program logic of the Web form page consists of Code. The Code is created to interact with the form. This file is called a "code hidden" file. If it is created in C #, the file will have the ". ascx. cs" extension.
B. web forms are also similar
C. The code hidden files of all Web forms pages in the project are compiled into the dynamic link library (. dll) file of the project.
D. None of the above are correct.
5. The following ASP. NET Statement () correctly creates a connection with the SQL Server database.
A. SqlConnection con1 = new Connection ("Data Source = localhost; Trusted_Connection = Yes; Initial Catalog = myDB ");
B. SqlConnection con1 = new SqlConnection ("Data Source = localhost;
Trusted_Connection = Yes; Initial Catalog = myDB ");
C. SqlConnection con1 = new OleDbConnection ("Data Source = localhost;
Trusted_Connection = Yes; Initial Catalog = myDB ");
D. SqlConnection con1 = new SqlConnection (Data Source = localhost; Trusted_Connection = Yes; Initial Catalog = myDB );
6. Which of the following objects must be used for executing a data deletion without a return value? ()
A. SqlConnectionB. SqlDataAdapterC. SqlCommandD. SqlDataReader
7. In ADO. NET, the following statements about the ExecuteNonQuery () method and ExecuteReader () method of the Command object are false ()
A. SQL statements for insert, update, delete, and other operations are mainly executed using the ExecuteNonQuery () method;
B. ExecuteNonQuery () method returns the number of rows affected by SQL statement execution.
C. The SQL statement of the Select operation can only be executed by the ExecuteReader () method;
D. The ExecuteReader () method returns a DataReder object;
8. ASP. NET has a variety of maintenance technologies. Which of the following is stored on the client? ()
A. VIEWSTATEB. SESSIONC. APPLICATIOND. Data CACHE
9. How long is the default life cycle of Cookies? ()
A.20 minutes B .30 minutes C. One day D. failure due to browser Closure
10. int [] [] myArray = new int [3] [] {new int [3] {5, 6, 2}, new int [5] {6, 9, 7, 8, 3}, new int [2] {3, 2 }}; the value of myArray [2] [2] is ()
A.9B. 2C. 6D. Out of bounds
11. Which of the following events can be used to instantly determine the IP address of a user on an output cache page? ()
A. Page. InitB. HttpApplication. BeginRequest C. Page. LoadD. None of the above
12. Which of the following SQL statements is completely correct ()
A. Select count (*) from (select top 10 * from table order by bb) tb group by cc
B. update set bb = bb + 1 from table
C. Select count (*) from (select distinct * from table) tb group by cc
D. delete * from table
13. Which of the following regular expressions can be used to rewrite a. aspx URL? ()
A. Regex. Replace (sUrl, @ "/(\ d +). aspx", "a. aspx? ID = $0 ", RegexOptions. IgnoreCase)
B. Regex. Replace (sUrl, @ "/(\ d +). aspx", "/a. aspx? ID = $0 ", RegexOptions. IgnoreCase)
C. Regex. Replace (sUrl, @ "/(\ d +). aspx", "a. aspx? ID = $1 ", RegexOptions. IgnoreCase)
D. Regex. Replace (sUrl, @ "/(\ d +). aspx", "/a. aspx? ID = $1 ", RegexOptions. IgnoreCase)
14. The output result of the following javascript code is ()
Var aa = new Array (1, 2, 4, 5, 3, 6 );
Var c = 0;
For (var I = 0; I <aa. length; ++ I) {c + = aa. pop ();}
Document. write (c );
Tip: the Array. pop () function removes the last element from the Array and returns this element.
A.7 B .14 C.21 D. None of the above are correct

Fill in blank questions (4 questions in total ):
I. C:
II. The following enumerated definitions are available: public enum TrainType {air conditioner, fast, new, and sleeper}. What values will you assign to the bitwise combination of them? Separate them by commas (,).
3. in C #, to prevent code access from the current Assembly, what keywords can be used to modify the class or class members?
4. In order to output data of the bb (datetime type) field in the table in descending order of year and month, the corresponding SQL statement is

Multiple choice answer:
1. B, 2.D, 3.C, 4.BC, 5. B, 6.AC, 7.C, 8.A, 9.D, 10.D, 11. B, 12.AC, 13.D, 14. B
Answer to the blank question:
1. (k & 1) = 0 or k % 2 = 0
2.1, 8 (the answer is not correct, depending on the situation)
3. internal
4. select * from table order by year (bb) desc, month (bb) desc

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.