ASP. NET interview materials [5]

Source: Internet
Author: User
What are the major bugs in session? What methods does Microsoft propose to solve them?
A: The session is lost when the system is busy due to the process recycle mechanism in IIS. You can use sate server or SQL Server database to store the session. However, this method is slow, the end event of the session cannot be captured.
What is the role of adding static before member variables and member functions?
A: They are called common member variables and common member functions, also known as class member variables and class member functions. They are used to reflect the status of the class respectively. For example, a class member variable can be used to count the number of class instances. class member functions are responsible for such statistical actions.
Describes several common methods for passing parameters between pages in. NET and their advantages and disadvantages.
A: Session (viewstate) is simple but easy to lose.
Application global
Cookies are simple but may not be supported and may be forged.
Input tType = "hidden" is simple and may be forged
The URL parameter is simple and displayed in the address bar with a limited length.
The database is stable and secure, but its performance is relatively weak.
What does GAC mean?
A: Global Program Set cache.
How many requests can be sent to the server?
A: Get and post. Get is generally the link mode, and post is generally the button mode.
How many stages are involved in the software development process? What is the role of each stage?
Answer: demand analysis, architecture design, Code Writing, QA, and deployment
In C #, what are the meanings of using and new keywords? Using command and statement new create instance new hide methods in the base class.
A: Using introduces namespaces or uses unmanaged resources.
New create an instance or hide the parent class Method
To process a string, remove the spaces at the beginning and end of the string. If there are consecutive spaces in the string, only one space is reserved, that is, multiple spaces are allowed in the string, however, the number of consecutive spaces cannot exceed one.
A: String inputstr = "xx ";
Inputstr = RegEx. Replace (inputstr. Trim (),"*","");
What is SQL injection and how to prevent it? For example.
A: Use the SQL language vulnerability to obtain a valid identity to log on to the system. For example, the identity verification program is designed as follows:
Sqlcommand COM = new sqlcommand ("select * from users where username = '" + t_name.text + "' and Pwd = '" + t_pwd.text + "'");
Object OBJ = com. excutescale ();
If (OBJ! = NULL)
{
// Pass Verification
}
This code is vulnerable to SQL injection. If you enter 1 'and 1 = '1 in t_pwd in t_name, you can enter the system.
What is reflection?
A: Dynamically Retrieve assembly information
How to Write Design Patterns with Singleton
A: In the static property, the new constructor is private.
What is application pool?
A: Web applications, similar to thread pools, improve concurrency performance.
What is a virtual function? What is a pumping function?
A: virtual functions: functions that can be inherited and rewritten by sub-classes. Image pulling function: specifies the functions that must be implemented by non-virtual subclass and must be overwritten.
What is XML?
A: The markup language can be expanded using XML. Extensible Markup Language. Tag refers to the information symbols that computers can understand. With this tag, computers can process various types of information. Article . To define these tags, you can select an international markup language, such as HTML, or use a markup language that is freely determined by people like XML. This is the scalability of the language. XML is simplified and modified from SGML. It mainly uses XML, XSL, and XPath.
What is a user control in Asp.net?
A: The user control is generally used when the content is mostly static, or a little changes... it is relatively large... similar to include... in ASP, but the function is much more powerful.
List the XML technologies you know and their applications.
A: XML is used for configuration. It is used to save static data types. Web Services... And config are the most exposed to XML.
What is code-behind technology.
Answer: aspx, resx, and CS files are separated by code. HTML code and server code are separated to facilitate code compilation and arrangement.
C # What are the differences between property and attribute? What are their respective uses? What are the benefits of this mechanism?
A: attributes are used to access fields of a class, and features are used to identify additional properties of a class or method.
Main differences between XML and HTML
Answer: 1. XML is case-sensitive and HTML is not.
2. In HTML, if the context clearly shows where the paragraph or list key ends, you can omit

 

Or an end tag. In XML, the end mark cannot be omitted.
3. In XML, an element with a single tag but no matching ending tag must end with one/character. In this way, the analyzer does not need to find the end mark.
4. in XML, attribute values must be placed in quotation marks. Quotation marks are usable in HTML.
5. In HTML, You can have attribute names without values. In XML, all attributes must have corresponding values.
Which of the following types of Class Members are accessible?
A: This.; new class (). method;
All Custom User Controls in Asp.net must inherit from ________?
A: control.
In. net, all serializable classes are marked _____?
A: [serializable]
In. Net hosting code, we don't have to worry about memory vulnerabilities. This is because ______?
A: GC.
In. net, can system. Web. UI. Page be inherited?
A: Yes.
What is the error handling mechanism of. Net?
A: the. NET error handling mechanism adopts the try-> catch-> finally structure. When an error occurs, it is thrown layer by layer until a matched catch is found.
Operator is used to declare and only declare =. Is there any error?
A: Do you want to modify equale and gethash () at the same time ()? If "=" is reloaded, it must be reloaded "! ="
A password only uses five letters (K, L, M, N, and O). The words in the password are arranged from left to right. The password words must follow the following rules:
(1) the minimum length of a password word is two letters, which can be the same or different.
(2) K cannot be the first letter of a word.
(3) If l appears, more than once
(4) M cannot make the last or second-to-last letter
(5) If K appears, N must appear.
(6) If O is the last letter, l must appear
Question 1: Which of the following letters can be placed behind o in Lo to form a three-letter password word?
A) k B) L C) m d) N
Answer: B
Question 2: If the letters K, L, and m can be obtained, what is the total number of two letter-length password words?
A) 1 B) 3 C) 6 d) 9
Answer:
Question 3: Which of the following is the word password?
A) klln B) loml c) mllo d) nmko
Answer: c
C # What are the differences between property and attribute? What are their respective uses? What are the benefits of this mechanism?
A: attribute: The base class of the custom attribute. property: the attribute in the class.
C # Can I perform direct operations on the memory?
A: In.. net ,. net references the garbage collection (GC) function, which replaces programmers. However, in C #, the Finalize method cannot be directly implemented, but the finalize () method of the base class is called in the destructor.
ADO. What are the main improvements to net over ado?
A: 1. ado.net does not rely on the ole db provider, but uses the. NET-managed provider,
2: Do not use com
3: dynamic cursors and server games are not supported
4: You can disconnect the connection and keep the current dataset available.
5. Forced type conversion
6: XML support

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.