Reverseajax Reverse Ajax is a Web implementation pattern designed to transfer logical control to the server
What is the transfer of control rights
Traditional Ajax calls are typically triggered by client behavior, such as obtaining zone data,
Copy Code code as follows:
Using System;
Using System.Collections.Generic;
Using System.Text;
Using System.Data;
Using System.Reflection;
Using System.Collections;
Using System.Data.Common;
public class Convertjson
{
#region Private
Get the IP address of the client, the code is as follows:
Copy Code code as follows:
Get Client IP Address
public string Getclientip ()
{
String userip = request.servervariables["Http_x_forwarded_for"];
if (Userip =
Copy Code code as follows:
1, Rowcommad
Get index
int index = ((GridViewRow) ((Button) (E.commandsource). parent.parent)). RowIndex;
2, rowediting, etc.
Get index
int index = E.neweditindex;
Gets the current GridViewRow object
Sample code Download: Http://zsharedcode.googlecode.com/files/JQueryElementDemo.rar
The content contained in this article is as follows:
* Prepare* General processing program/ASHX* Webservice/asmx Preparation
If you want to return JSON via ashx
So far, we've talked about storing caches in asp.net output cache (memory and hard disk), and browser caching, while another common practice for large sites is to deploy caching on reverse proxy servers, which we often call reverse proxy caching,
1, ClientIDModeRendering the ASP.net control automatically generates an ID that, when referenced in client script, creates a lot of trouble, although it is a simple concatenation of naming containers and IDs, but it still cannot predict the range of
If the page simply use JS to create, to write a large number of code, and not intuitive.
In asp.net, we can actually create user-defined controls that return user-defined HTML code through AJAX requests.
Copy Code code as follows:
public
Copy Code code as follows:
Using System;
Using System.Data;
Using System.Configuration;
Using System.Web;
Using System.Web.Security;
Using System.Web.UI;
Using System.Web.UI.WebControls;
Using System.Web.UI.WebControls.WebParts;
Using
1, static template page template.html, mainly defines a number of special characters, used to be replaced.
Copy Code code as follows:
Title
Title
Browse Times time
Content
Pager
see more
Asp. NET account does not have permission to manipulate Microsoft Office objects by default, and if no permissions are configured, the code throws an exception that resembles the following:
Retrieving a component with a CLSID of {00024500-0000-0000-
There is a problem: the name of the form and the object's property name (I am a property assignment you can also use the field) to keep the same, a bit insecure, but the background is very good, in the said fill out form data background with more
The implementation code is as follows:
Copy Code code as follows:
Using System;
Using System.Collections;
Using System.Configuration;
Using System.Data;
Using System.Linq;
Using System.Web;
Using System.Web.Security;
Using
Copy Code code as follows:
Page links
The quantity shown before the current page
The quantity shown after the current page
public string pagelink (int pageSize, int recordCount, int currentpage, int prev, int next)
{
int
Copy Code code as follows:
Gets the Excel data for the specified path, the name of the specified workbook: Data from the first sheet
File storage path
Workbook name
If you try to find the data will return a full table,
Add caching support to the data tier, business logic tier, UI, or output layer. Memory is now very cheap-therefore, a great performance improvement can be achieved by implementing caching in the entire application in an intelligent manner. Caching
The effect and control of printing is not very good, but can also be used reluctantly, to deal with the general printing is OK.
The code looks like this:
Code
Copy Code code as follows:
Call PRINTCONTROL.EXECWB (?,?) Enables direct
Non-generic web programs or products typically do not deal with ASP.net medium security mode because the user community is fixed, or the deployment environment can be determined by the program provider.
But in doing general-purpose web products, you
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.