Trivial:
Server
Server. Execute ("path"); // Execute the processing program in the virtual path in the current context, which can be used to open the aspx File
Navigation controls
SiteMapPath control: Use Web. the sitemap file (or xml can be used) binds url, title, and other attributes. You can set various styles for editing templates. If you do not understand the template, translate the words or search for them, the template style is ever-changing and there is a lot of room for change
TreeView control: You can also use the Web. sitemap file to bind the xml Attribute when editing the properties of the control. Template same as above
Master Page Control and attribute acquisition
Master. FindControl ("Master page Control ID"). This code is used in subpages. If attributes are defined on the template page
{ { Value =
Value is the id of the Label control on the template page. You can use Master. MasterValue directly to obtain the Label control on the Master page.
Access the nested master page control
This. Master. Master. FindControl ("ContentPlaceHolder1"). FindControl ("Control ID ");
Idea: Find the master from the parent container
Send a script to the client
This. Page. ClientScript. RegisterStartupScript (this. GetType (), "key", "script text ");
ADO. NET
Check whether the set contains columns with the specified name.
Table. Columns. Contains ("column name"), used for determining the bool type
Pseudo-static implementation
Generally, components are used. Here the IHttpHandler interface is used.
Create a cs file and enable the class to implement the IHttpHandler interface.
Add the configuration in the <system. web> node
Roughly so
<Add verb = "*" path = "access path such as *. shtml" type = "class name, that is, the class name in the created cs"/>
Url = id = Url.Substring(Url.LastIndexOf() + ).Replace(, +
Simple From verification to restrict access
The following is my understanding.
1. Web. config
2. The above
This section denies all other unauthenticated users from accessing files or webpages in this directory. Use
In this way, the verification function is useless.
After the preceding settings
"Allow"
"Deny"
You can have your own configuration file in each directory to achieve different access permissions (Create web. config in each restricted file ).
Write the following configuration
For more information about multi-level multi-directory processing on the Internet, see
We will discuss the following (path in the location Node
As we mentioned above, each directory can have its own configuration file to achieve different access permissions. When there are many subdirectories, maintenance is more difficult, is there a simple and unified processing method? The answer is, of course, yes. We can
Careful people may have discovered
Open
Paste the copied content (the content is
Finally, we know that
<Configuration>
<SessionState cookieless = "true" timeout = "20"/>
</Configuration>
You can solve the problem.