ASP. NET implements multi-domain name multi-site shared Session Value
1. Implementation function: You can set which sites can share the Session value, so as to prevent others from using this to access
To implement this function, you must put the
Copy codeThe Code is 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 =
Copy codeThe Code is as follows:/// /// Compress the image/// /// Public string ResizePic (){# Region Compression Image startBool IsImgFile = true; // determines whether it is an image file.String filePathName = "123"; // file storage path (Folder
In use. NET, the next problem may be the problem of procedural optimization, and performance optimization sometimes involves all aspects, for example, the host system, database, and network environment of the program. When the program is
(1) Common Columns Copy codeThe Code is as follows:/// /// Merge the Gridview columns (Common columns, excluding template columns)/// Note: 1. The same rows can be put together by grouping and sorting when the GridView is bound./// 2. The method
Note: An unhandled exception occurs during the execution of the current Web request. Check the stack trace information for details about the error and the source of the error in the code.Exception details: System. BadImageFormatException: failed to
Therefore, an HTMl file is saved when each file is uploaded, so that the online preview function can be realized. The main code is as follows:Copy codeThe Code is as follows:Using System;Using System. Collections;Using System. Configuration;Using
No paging. In this way, if the data size is large, the situation becomes very bad. It usually takes a long time to open a webpage, greatly reducing the user experience.Paging is also very exquisite. Different databases often correspond to different
Use this post to continuously record some collected advertising effects. We hope to provide some support to our friends who need it. I also hope that my friends will post the unrecorded advertisements together. Make this post more perfect and share
Problem:Some time ago, a functional block similar to a friendly link was created in the system, and it continued to run well until the following link address was added one day: http: // www. ****. com/user. aspx? Id = shuitian, a major problem
We will not talk about how to simulate data for the moment. We can use a simple form to see what data the client has submitted to the server when a request occurs.The following is a simple html form, two text input boxes, and one file upload (here I
Write the Cookie page. After creating the cookie, set the cookie attribute and add it to Response. the cookie is read from the cookie, and the cookie name or index is used from the Request. cookies get rewrite Cookies. First, create a Cookie with
For example: Output xmlDom, logout and jump, there is no html output, it is very troublesome, you need to create a page, delete unnecessary html, and write processing code in page_load. The use of HttpHandler does not need to be so troublesome.You
1. Bin folder The Bin folder contains the deployable assembly required by the application for controls, components, or any other code to be referenced. Any. dll files in this directory are automatically linked to the application. If unnecessary or
Some time ago, I needed to dynamically create WEB Components during development. I thought it was a trivial matter, but it was easy to do it. There are some minor issues. Next, I will introduce how to dynamically create and use WEB Components Based
. Do not write all the code to the. cs page for. net, instead of using convenient control operations provided by.. Do not think. net is to drag various controls to the page, and then set it easily through.. Do not think that. net needs to read all
In the asp.net program, you can choose to use the Crystal Report, which is indeed powerful. However, the web-based Crystal reports seem to have copyright issues. If the report is not a complex mess, you can use the Rdlc report that comes with
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