Interview Questions from some ASP. net r & D engineers

Source: Internet
Author: User

I haven't worked as a formal engineer for a long time since my internship. Recently, I feel a little idle and suddenly feel that I am quite normal under work conditions. I received a technical interview call from a company at this morning and talked for more than half an hour. I still answered the basic questions, but I still have to discuss some details. I will sort it out in idle time and add myself.

 

I. First, let's talk about the introduction to the previous project development and some problems encountered in the previous project development. I even asked how to solve these problems?

This is a common problem during the interview process. Maybe the interviewer is checking whether the person who delivers the resume is the same as the resume. I have seen many people who write the resume fairly well, result 1: The interview is complete!

I describe the project according to the actual situation, and then briefly introduce the project module, as well as some problems encountered in project development and the introduction of data tables.

Ii. asp. net server controls, such as textbox. If a textchanged event is added, how does the server receive the event when the client triggers the event and how does the server handle the event?

To be honest, I really admire this interviewer. From his description of the problem, I can tell that he should be a guy in the big bull, and his level is not under the big brother tan.

This problem can be understood as ASP. NET running and lifecycle issues. A trigger event is a server event. First, you have a node selection operation on the client. At this time, you can use the JavaScript method (usually the _ do_postback method, which is ASP.. net) to send back some information to the server, including all the status of the current client page, the ID of the control that triggers the sending back, and so on.
After receiving the information sent back by _ do_postback, the server processes the information, finds the corresponding processing method, and then executes it. After the page is generated, send it to the client.

3. What is the lifecycle of an ASP. NET page? What are the details of a user's request to An ASPX page from request to page display?

From this question to session, application, cookie, and viewdata, it is obviously incorrect. The answer should be as follows:

1. page_init ();
2. Load viewstate and PostBack data;
3. page_load ();
4. Handle control events;
5. page_prerender ();
6. page_render ();
7. Unload event;
8. dispose method called;

4. Next, the interviewer asked me about the application scope of session, cookie, and application, as well as the advantages and disadvantages of these global variables.

1. application is used to save the data information shared by all users. If the stored data does not change or rarely change during the lifetime of the application, use it. However, there is a web. config in Asp.net, which may be better. To use the application, you must consider that any write operation must be completed in the application_onstart event (Global. asax. Although the application. Lock and application. Unlock methods are used to avoid Operation synchronization, They serialize application requests, which may cause performance bottlenecks when the Website access volume is large. Therefore, it is best not to use it to access large datasets.

2. The session is used to save the dedicated information of each user. the lifetime of the session is the duration of the user's sustained request plus a period of time (which can be set in Web. config. The default value is 20 minutes ). The session information is stored in the server's memory. Of course, you can set the method for saving the session information (such as the information stored in the SQL database ). Since the user stops using the program and it remains in the memory for a period of time, the efficiency of using the session object to save user data is very low. For a small amount of data. Session is a good choice.
3. Cookie is used to save the request information sent from the client browser to the server page. programmers can also use it to save non-sensitive content. You can set the Save time as needed. If no cookie expiration time is set, it will only be saved to the browser. If the cookie is set to Min value, it never expires. The cookie storage capacity is limited. Generally, the maximum size of a browser is 4096 bytes. Therefore, it cannot be used to store large amounts of data. Since not all browsers support cookies and they are saved in plain text, it is best not to save sensitive content. Otherwise, network security is affected.

5. As I have previously worked on a JSP page at Sun Yat-sen University, the interviewer asked a question about ASP. NET and JSP, that is, what is the difference between the server side's mechanism for processing client control events?

This problem is basically the same as Issue 2.

6. After asking about ASP. NET, the interviewer started to start with C #. The first question was, how does the subclass rewrite the parent class method?

1. If the parent class contains a function to be rewritten, use override.

2. If the parent class does not contain this function, use public new override.

7. How do you understand reflection in C?

To be honest, these concepts have not been paid special attention to during normal development. Reflection (reflection) is. net, which can be obtained at runtime through reflection. net, including methods, attributes, events, and constructor. You can also obtain the name, qualifier, and parameters of each member. With reflection, you can be familiar with every type. If you obtain information about the constructor, you can directly create an object, even if the object type is unknown during compilation.

8. How do you understand the packing and unpacking mentioned earlier?

Binning converts the "Reference" type to the "value" type, and boxing converts the "value" type to the "reference type "; the reason is that sometimes some method parameters require the "Reference" type, and you want to pass the "value" type variable through this parameter, you need to use this operation. For example,

Object OBJ = "helloworld"; is packed

String STR = (string) OBJ;

9. What are the details of left join in SQL?

The interviewer gave an example, that is, table A and Table B. The bid in Table A corresponds to the bid in Table B. When performing the left join operation, he asked me what the table structure is.

The basic operation of left join is to retrieve all data in Table A first, and then add the data that matches table A and table B.

The right join operation is to first retrieve all the data in Table B, and then add the data that matches table A and table B.

The inner join operation is to retrieve the matched data from tables A and B.

10. How to Use the using keyword in C?

The answer to this question is still smooth. in C #, the keyword using mainly has two purposes:

1. As a statement, it is used to define a range. Objects will be released at the end of this range: When this is mentioned, the interviewer asked again: Will an array be released if it is defined? As a result, I continue to reply that the object provided for the using statement must implement the idisposable interface. This interface provides the dispose method, which releases the resources of this object.

2. As an instruction, it is used to create an alias for a namespace or import the types defined in other namespaces

Summary:

Although not all questions have been answered, I have understood that I need to pay attention to some basic concepts in the project development process. After all, everything comes from concepts. Only concepts can be combined with hands-on capabilities, is the invincible king. Finally, thank you to the interviewer.

 

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.