The following files need to be modified on the server
Locate the Web.config file in the directory C:\Windows\Microsoft.NET\Framework64\v2.0.50727\CONFIG. The server here is 64-bit, if 32-bit directory is C:\Windows\Microsoft.NET\Framework\v2.0.50727
The method has two, summarized as follows:
First method:Knock directly in CS code:Response.Buffer = true;Response.ExpiresAbsolute = DateTime.Now.AddSeconds (-1);Response.Expires = 0;Response.CacheControl = "No-cache";
When someone wants to push
This is the first step in this permission control, and the scanning interface gets the information of the elements to be assigned to the database.
This step is divided into three small steps:
(1). An element that marks the permissions to be
Some things in the last blog that didn't take into account this change the code as follows:
Foreground of the interface:
Copy Code code as follows:
"
"
"
Current Position: interface
Copy Code code as follows:
Object defining the Image class
Drawing.image Image,newimage;
Picture path
protected string ImagePath;
Picture type
protected string imagetype;
Picture name
protected string imagename;
Provides a callback
The blog program was deployed to a Aliyun Windows host today, and the following error occurred while accessing through the browser:
Copy Code code as follows:
An error occurred while creating the Blogconfigurationsettings
The first way to think of this is, of course, to iterate through the string and count:
Copy Code code as follows:
c1=0;
for (Inti=0;i {
if (str[i]== ' A ')
{
c1++;
}
}
The second method is also easy to think of,
The following textbox
Copy Code code as follows:
1. Add a script to the page:
Copy Code code as follows:
2. Add in code:
Copy Code code as follows:
Try
{
Convert.todouble (TextBox1.Text.Trim ());
}
Copy Code code as follows:
Using System;
Using System.Globalization;
Using System.Collections;
Using System.Configuration;
Using System.Data;
Using System.Web;
Using System.Web.Security;
Using System.Web.UI;
Using
1-in ASPX and Aspx.cs, both are session["xxx"]= "AAA" and aaa=session["xxx". ToString () for reading and writing.
In Ashx, the session is to use Context.session, read and write method is this:
Context. session["xxx"]= "AAA" and Aaa=context.
Copy Code code as follows:
Using System;
Using System.Web;
Using System.Web.SessionState;
public class Changepwd:ihttphandler, ireadonlysessionstate
{
public void ProcessRequest (HttpContext context)
{
Context.
1, in the editing column, there is a direct set column width! If you don't want cell content to hold the cell large, add a style, meaning that each column is fixed to the original set style, no longer changes, the excess part of the hidden
2 . You
Do some projects are relatively small, and time tight, there are a lot of things have not come to a hasty summary, while this will have a little time to use the previous project to share the knowledge, only for later convenience.Front page code
Copy Code code as follows:
Using System;
Using System.Collections.Generic;
Using System.ComponentModel;
Using System.Data;
Using System.Drawing;
Using System.Text;
Using System.Windows.Forms;
Namespace WindowsFormsApplication1
{
public
The ExecuteNonQuery () method updates the data primarily by the user, typically using the Update,insert,delete statement to manipulate the database, and the method returns the value meaning: for the Update,insert,delete statement Execution success
Copy Code code as follows:
Set the page not to be cached
private void Setpagenocache ()
{
Response.Buffer = true;
Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds (-1);
Response.Expires = 0;
Response.CacheControl =
Method One:
Copy Code code as follows:
int i=0;
if (!int. TryParse (This.txtPage.Text, out i))
{
Response.Write (' ");
This.txtPage.Text = string. Empty;
}//judge whether it is a number
Method Two:
Copy Code
But this variable will not be a fixed value, will change according to the actual situation, such as in the need to read a configuration file path, and this path is the site published the actual hard drive path, if directly is the compile-time state,
Method 1 Comparison Recommendation
Copy Code code as follows:
Using HttpWebRequest to get the source page
For pages with a BOM is very effective, no matter what the code can be correctly identified
Web address "
return page
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