A set of ASP. NET pen questions, ASP. NET pen questions
1. How do I create custom controls?
A: The custom control is similar to HtmlControl or WebControl. After compilation, you can add a reference to the toolbar.
Area, directly drag with the mouse to use.
2. Interface layout?
A: Table, div
3. Program Execution Process
A: First compiled into an intermediate language, then translated into a platform-specific language.
4. How to understand the three-tier architecture?
A: MVC divides program functions into three parts: VIEW (visible User Interface), Model (Model, program data Model, and business logic ), controller (Controller, which changes the notification model and view according to user input ).
5. What are the verification controls? Usage?
A) Answer: RequiredFieldValidator (field verification is required );
B) CompareValidator (comparison verification );
C) RangeValidator (range verification );
D) RegularExpresionValidator (Regular Expression );
E) ValidationSummary (Verification summary );
F) CustomValidator (custom verification)
7. What is ERP? The evolution of ERP?
A: ERP is short for Enterprise Resource Planning. It is from MRP (material resources
Plan) the new generation of Integrated Management Information System, which expands the MRP function. Its core idea is supply chain management.
Beyond the boundaries of traditional enterprises, optimizing resources from the supply chain is a new generation of information system based on the network economy era. It corresponds
To improve business processes and core competitiveness of enterprises.
8. What is the difference between Asp and Asp.net?
A: ASP. net is free from the disadvantages of ASP's scripting language. Theoretically, any programming language, including C ++, VB, and JS, can be used. Of course, the most suitable programming language is MS. net Frmaework specifically released C (read c sharp), it can be seen as a mix of VC and Java, although MS speak C # kernel more like VC, but I still think it is more like Java. First, it is an object-oriented programming language, rather than a script, so it has all the features of object-oriented programming language, such as encapsulation, inheritance, polymorphism, etc, this solves the vulnerabilities of ASP just mentioned. Encapsulation makes the code logic clear, easy to manage, and applied to ASP. net can separate the business logic from the Html page, so no matter how the page prototype changes, the business logic Code does not need to be modified. Inheritance and polymorphism greatly improve the reusability of the Code, you can inherit existing objects to maximize your previous investment. C # provides a complete debugging/error correction system like C ++ and Java.
9. What are the differences between stored procedures and triggers and projects?
A: The stored procedure is a pre-compiled set of SQL statements and optional control flow statements. It is stored in a name and processed as a unit. Stored procedures are stored in a database and can be executed by an application through a single call. They also allow users to declare variables, conditional executions, and other powerful programming functions.
A trigger is a special type of stored procedure. When you use one or more of the following data modification operations to modify data in a specified table, the trigger takes effect: UPDATE, INSERT, or DELETE. Triggers can query other tables and contain complex SQL statements. They are mainly used to force complex business rules or requirements. For example, you can determine whether to allow order insertion based on the current account status of the customer.
Triggers also help to force reference integrity so that the defined relationships between tables are retained when a row in a table is added, updated, or deleted. However, the best way to force reference integrity is to define the primary key and foreign key constraints in the relevant table. If you use a database relationship diagram, you can create a relationship between tables to automatically create a foreign key constraint. For more information, see Table relationships.
The advantages of a trigger are as follows:
Triggers are automatic: they are immediately activated after any changes (such as manual input or operations performed by the Application) to the table's data.
The trigger can be changed through the relevant tables in the database. For example, you can write a delete trigger in the title_id column of the titles table to delete matching rows in other tables. The trigger uses the title_id column as the unique key to locate matched rows in the titleauthor, sales, and Royal sched tables.
Triggers can force restrictions, which are more complex than those defined by the CHECK constraint. Unlike the CHECK constraint, a trigger can reference columns in other tables.
10. Seven objects of ADO.net
Answer: Connection, Command, DataAdapter, DataSet, DataReader, configuration
11. Talk about data integrity and C # Security
A: data integrity refers to the correctness and consistency of data in the database. Data integrity constraints can be used to ensure the quality of data in the database. Therefore, we must pay attention to the design of data integrity when designing tables. Types include entity integrity, domain integrity, reference integrity, and user-defined integrity.
Security is a very important aspect of every C # application. It must be considered at each development stage, not just after the design and implementation.
A) use the checked keyword to control integer arithmetic operations and conversion overflow check context.
B) always use the strictest data type for parameters. For example, when you pass a value into a method that describes the size of the data structure, you should use an unsigned integer instead of an integer.
C) do not make a decision based on the file name. The file name can be expressed in different ways. Therefore, when detecting whether a specific file exists, the file may be skipped.
D. Do not hard-code passwords or other sensitive information into applications.
E) always verify the input used to generate the SQL query.
F) verify all input of the input method. The regular expression method in the System. Text. RegularExpressions namespace is useful for verifying that the input (such as email address) format is correct.
G) do not display exception information: it will provide valuable clues to any potential attackers.
H) Ensure that the application works properly when it runs under the lowest possible privilege. A few applications require users to log on as administrators
I) do not use your own encryption algorithm. Use the System. Security. Cryptography class.
J) specify a strong name for the Assembly.
K) do not store sensitive information in XML or other configuration files.
L) carefully check the hosted code that wraps the local code. Ensure that the local code is safe, especially in preventing Buffer Overflow.
M) exercise caution when using delegation passed out of the application.
N) Run FxCop on the Assembly to ensure compliance with the Microsoft. NET Framework Design Guidelines. FxCop can also find more than 200 code defects and issue warnings for these code defects.
12. Talk about the features of C/S and B/S.
A: C/S is the Client/Server. C/S programs are also called fat clients. Most functions of a program are implemented on the client, the server only implements a small part of the functions. From this point, it is not difficult to see that most of the C/S programs are implemented on the client side, and the pressure on the server side is relatively small, so the server side can save some. In addition, the C/S program uses a window. I think the development efficiency is faster. However, a major drawback of the C/S program is that you must install and deploy the program on the client to run the program, that is, you must obtain the client program to run the program. Therefore, you must consider the installation and configuration between different systems.
B/S is a browser/server, and B/S programs are usually called thin clients, which is opposite to C/S. Most of the functions of B/S programs must be implemented on the server side, and the client only needs to perform auxiliary control functions. Because the B/S program is directly deployed and installed on the server. You only need a browser and know the URL to use the program. The client can use the application without any configuration or installation. B/S also has shortcomings. First, most of the functions of B/S must be implemented on the server side, which requires a high level of server. The server must simultaneously cope with user access and program processing, so the server configuration must be able to cope. In addition, the B/S program is executed in the browser, so the B/S program operates the hardware of the client computer. Generally, You have to install ActiveX and Other plug-ins on the client to operate. Therefore, B/S programs have better advantages in operating hardware than C/S programs.
13. What are the naming rules for variables?
Answer: hump, Hungary, attributes + Type + description
14. What is the difference between ADO and ADO. NET?
A: ADO uses ole db interfaces based on Microsoft's COM technology, while ADO. NET has its own ADO. NET interface and is based on Microsoft's. NET architecture.
ADO is stored in Recordset, while ADO. NET is represented in DataSet. The Recordset looks more like a single table. If you want the Recordset to be represented in multiple tables, you must connect multiple tables in SQL. Instead, DataSet can be a set of multiple tables. The operation of ADO is an online method, which means that both browsing and updating data must be real-time. ADO. NET is used offline, ADO. NET will use XML to make a copy of the data, ADO.. NET databases must be connected online only during this period.
Since ADO uses the COM technology, this requires that the data type used must comply with the COM specification, while ADO. NET is based on the XML format, and the data types are more abundant and do not need to be converted due to the COM orchestration, thus improving the overall performance.
15. What are the six built-in ASP objects and JSP objects?
16. About SQLSEVER Security
A:
Topic description
Administrator Security
Provides information about managing security roles
End user security
Determine issues related to implementing end user security
User accounts and groups
Provides information about the user accounts required to create an Analysis Manager role.
Database, Multidimensional Dataset, and mining model role
Describes the three types of security roles used in Analysis Services.
End user security level
Determine the Analysis Services object that a security role can apply
Server security and authentication
Provides information about how to use authentication to apply server security in Analysis Services
Database Security
Describes how database security roles work with database security.
Multidimensional Dataset Security
Describes how a multi-dimensional dataset security role works with the security of a multi-dimensional dataset.
Dimension Security
Describes how dimension security specifications are used in combination with Multidimensional Dataset security.
Unit security
Describes how the Unit Security Specification is used in combination with Multidimensional Dataset security.
Operational considerations
Provide information on the analysis server process to ensure system security
Mining Model Security
I recommend a set of net website development questions,
1. Briefly describe the access permissions of private, protected, public, and internal modifiers.
A. private: private Members can be accessed within the class.
Protected: protects members, which can be accessed within the class and in the inheritance class.
Public: A public member. It is completely public and has no access restrictions.
Internal: accessible within the same namespace.
2. List several methods for passing values between ASP. NET pages.
Answer. 1. Use QueryString, such ....? Id = 1; response. Redirect ()....
2. Use Session Variables
3. Use Server. Transfer
4. What is the delegate in C? Is an event a delegate?
A: A delegate can substitute a method as a parameter to another method.
A delegate can be understood as a reference to a function.
Yes, it is a special delegate
5. Differences between override and overload
A: What is the difference between override and overload. Overload means that the method name is the same. Multiple
Secondary overload to meet different needs
Override is used to Override functions in the base class. To meet your needs.
6. If the variable value needs to be passed in a B/S system, but the Session,
Cookie and Application. How do you handle them?
A: this. Server. Transfer
9. To describe the implementation process of the indexer in C #, can it be indexed only by numbers?
A: No. Any type can be used.
11. Use. net as the B/S structure system. You are using several layers of structure for development. The relationship between each layer and
What do we need to layer it like this?
A: Generally, it is three layers.
Data access layer, business layer, and presentation layer.
The data access layer adds, queries, and modifies databases.
The business layer is generally divided into two layers. The business apparent layer communicates with the presentation layer, and the business rule layer Implements user authentication.
Code security.
The presentation layer adds a form to interact with users, for example, users.
Advantages: clear division of labor, clear organization, easy debugging, and scalability.
Disadvantage: increase costs.
13. What is an application domain?
A: The application domain can be considered as a lightweight process. Security. Small resource occupation.
14. What are the explanations of CTS, CLS, and CLR?
A: CTS: a general-purpose language system. CLS: general language specification. CLR: Common Language Runtime Library.
15. What is packing and unpacking?
A: From the value type interface to the Reference Type Packing. Converts a reference type to a value type Unbox.
16. What is regulated code?
A: unsafe: unmanaged code. Does not run through CLR.
17. What is a strong system?
A: RTTI: The type recognition system.
Which classes are required for reading and writing databases in 18.net? What are their roles?
Answer: DataSet: data storage.
DataCommand: Execute the statement command.
DataAdapter: a collection of data.
What are the authentication methods for 19.ASP.net? What are their principles?
Answer: 10. Windwos (default) IIS... From (form) account... Passport (key)
20. What is Code-Behind technology?
A: Code post-planting.
21. In. net, what does the accessory mean?
A: assembly. (Intermediate language, source data, resources, assembly list)
22. What are common WebService call methods?
A: 1.use the wsdl.exe command line tool.
2. Use the Add Web Reference menu option in VS. NET
What is the working principle of 23..net Remoting?
A: the server sends a process number and a program domain number to the client to determine the object location.
.
24. In C #, string str = null and string str = "". Use text or graphs whenever possible.
The difference.
A: string str... the remaining full text>
What are the common questions of ASPNET programmers?
2. List several methods for passing values between ASP. NET pages.
A. 1). Use QueryString, such ....? Id = 1; response. Redirect ()....
2). Use Session Variables
3). Use Server. Transfer
3. the rules for a column are as follows: 1, 1, 2, 3, 5, 8, 13, 21, 34 ...... calculate the number of 30th digits and use a recursive algorithm.
A: public class MainClass
{
Public static void Main ()
{
Console. WriteLine (Foo (30 ));
}
Public static int Foo (int I)
{
If (I <= 0)
Return 0;
Else if (I> 0 & I <= 2)
Return 1;
Else return Foo (I-1) + Foo (I-2 );
}
}
4. What is the delegate in C? Is an event a delegate?
A:
A delegate can substitute a method as a parameter into another method.
A delegate can be understood as a reference to a function.
Yes, it is a special delegate
5. Differences between override and overload
A:
The difference between override and overload. Overload means that the method name is the same. The parameters or parameter types are different and are reloaded multiple times to meet different needs.
Override is used to Override functions in the base class. To meet your needs.
6. If you need to pass variable values in a B/S system, but you cannot use Session, Cookie, and Application, how can you handle them?
Answer: QueryString, FormsAuthentication, this. Server. Transfer
7. programmatically traverse all TextBox controls on the page and assign it a string. Empty?
A:
Foreach (System. Windows. Forms. Control control in this. Controls)
{
If (control is System. Windows. Forms. TextBox)
{
System. Windows. Forms. TextBox tb = (System. Windows. Forms. TextBox) control;
Tb. Text = String. Empty;
}
}
8. How can I program a Bubble sorting algorithm?
A:
Int [] array = new int [*];
Int temp = 0;
For (int I = 0; I <array. Length-1; I ++)
{
For (int... the remaining full text>