In the first article, I briefly described the meaning of my cms tag. AnCMS (c #) Article 1 Data BindingIn the second article, I will show the code that actually runs behind the tag. Principles of cms in asp.netIt seems that open source is a little
The. aspx page only pulls one TextBox Control:Copy codeThe Code is as follows: In the. aspx. cs page, you are preferred to register the OnBlur event for the TextBox in the Page_Init event:Copy codeThe Code is as follows:Protected void Page_Init
ASP. NET Cache
Introduction
Cache is a technology used to store data in the memory and one of the important features provided by ASP. NET. For example, you can cache data during complex queries, so that later requests do not need to retrieve data
Example:The following code example demonstrates how to use the BackgroundWorker component to load an XML file from a URL. When you Click the "Download" button, the Click event handler calls the RunWorkerAsync method of the BackgroundWorker component
I. resource files A resource file is a file that stores resources. Resource files have their own unique advantages in programming. They are independent from source programs, so that resource files can be used by multiple programs. At the same time,
1. The FindControl method is used to find the range of the Child Control of the given Control.Copy codeThe Code is as follows: As shown in the above Code, Panel1.FindControl ("Button1") is used in the background to search for it. The smaller range
We can see that Discuz is merged by two drop-down lists. I found some information on the Internet and wrote this small source code. I will share it with you here!Run the command, as shown in the following figure (the deep black area is not selected,
This method helps improve the performance of applications, avoid wasting computing resources, and save memory usage. In this way, it seems that it is more appropriate to create an out-of-the-box instance.First, let's take a look at how to implement
Let's take a look at the method (some judgments and extensions are omitted ):Generate old Excel CodeCopy codeThe Code is as follows:/// /// Export a group of objects to EXCEL/// /// type of the object to be exported /// A group of objects ///
If you delete all the HTML tags in it, it may cause reading difficulties (such as a and img tags). It is best to delete a part and keep a part.In a regular expression, it is easy to understand how to determine whether to include certain strings, but
Today, on a data modification page, there is a DropDownList control bound to an important attribute in the object. I want the user to prompt the user when modifying the control value, he modified the value of the control. Therefore, the following
1. Vertical table shardingVertical table sharding refers to splitting a table with 20 columns into two tables, one table with 10 columns and one table with 11 columns. This reduces the capacity of a single table, it can improve the query performance,
The watermark Function Code is as follows:Copy codeThe Code is as follows:/// /// Image modification class, mainly used to protect the copyright of the image. The copyright belongs to the original author./// Public class picmark{# Region "member
Methods To include files in ASP. NET include:1. 2. 3. The StreamReader object writes the included files to the HTTP Content stream.// Me: I can also use include in asp.net on the Internet ..What is the difference between include and Server.
Paging MethodCopy codeThe Code is as follows:/// ////// /// /// Control ID /// data source /// current page /// Number of data entries per page /// page search parameter like & a = a & B = B /// Public static string ShowPage (System. Web. UI.
1. traverse all TextBox in the page and set the value to String. EmptyCopy codeThe Code is as follows:For (int j = 0; j {Foreach (object o in Page. Controls [j]. Controls){If (o is TextBox){TextBox txt = (System. Web. UI. WebControls. TextBox) o;Txt.
In the server security section, I wrote an article titled cracking common SQL Injection prevention methods. Some common anti-injection methods do not filter cookie data, this leaves hackers with an opportunity. Of course, this code also filters the
Set the following in web. config:Copy codeThe Code is as follows: ~ /D (\ d +) \. aspx ~ /Default. aspx? Id = $1 WhereThe handler class used to specify the configuration section "RewriterConfig" is named "URLRewriter. Config.
0. Introduction The Web page is stateless, and the server considers each request to come from different users. Therefore, the status of the variable is not retained between consecutive requests to the same page or when the page jumps. Asp. when
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