CopyCode The Code is as follows: // The background
[Httppost]
Public jsonresult checkstock (ienumerable pvids)
{
}
Public class pvidscount
{
Public int PVID {set; get ;}
Public int count {set; get ;}
}
// Front-end
$ (Document). Ready (function (){
Each time the cache is cleared, a new data will be generated. Therefore, the browser cache is the final problem. After a long struggle, I finally solved the problem. Here I will summarize it.
We all know that AJAX can increase the page loading
Because the No. 1 evaluation system needs to add a new function "questionnaire", I want to keep the questionnaire prepared by others. The advantage of using others is that they are specialized in other people's work, ui beautification is very
Recently, when I was working on a project, I needed to add a function to upload user images. Uploading user images actually involves a lot of things, it is not just an html tag or a FileUpload control blocked by asp.net. Currently, the website does
Many times when you apply for an exam or fill in a volunteer, do you have to fill in the page information after you have considered it for a while, but the page expiration is displayed when you submit it, and you have to enter it again quickly;
When "get" is used, the captured page is appended with the encoding type
Copy codeThe Code is as follows: Server: servletactioncontext. getresponse (). setcharacterencoding ("UTF-8 ");
Client webpage special effect p/jsp.html target = _ blank> jsp
In the past, I wrote about the garbled solution of Get and post when js calls AJAX in Sina Blog, but it is complicated to use js Code, when using ajax for data interaction, we can use jQuery, a mature framework of js.
For the design of a website,
Copy codeThe Code is as follows:
Save: -- select -- City: -- select -- County: -- select --
Webservice:
Copy codeThe Code is as follows: [WebMethod] // load Province
Public List loadprovince () // Why do I need to use list? Because the
------------------------------------- WebService1.asmx ---------------------------------------
Copy codeThe Code is as follows: // to allow ASP. net ajax to call this Web service from a script, cancel the comments to the downstream.
[System. Web.
Copy codeThe Code is as follows: --------------------- WebService1 -----------------------------
// To allow ASP. net ajax to call this Web service from a script, cancel the comments to the downstream.
[System. Web. Script. Services.
Loading data from the scroll drop-down to the bottom of the page is the practice of many waterfall stream websites. Let's take a look at how jsonp is implemented. You can use the summary record of the dishes.
Of course, this example uses the jquery
I. load () method (simplest)
Load (url, [data], [callback])
Url: the address of the loaded page.
Data: Optional. data sent to the server. The format is key/value.
Callback: optional, callback function
1. The simplest application
Copy codeThe Code is
Although Prototype. js is also used for writing, the class implementation still uses the method in JavaScript advanced programming because of its ignorance. When AJAX is used for data verification, XML is initially used as the data source. However,
Step 1: import the jquery plugin
Copy codeThe Code is as follows:
Step 2: add the information display area in .Copy codeThe Code is as follows:
Step 3: Add JS Code to the pageCopy codeThe Code is as follows:
Step 4: Process requests in
The effect is roughly as follows:
Javascript uses jquery. Create an Asp.net web project and use NuGet to obtain the latest Jquery version.
The database uses Nhibernate and the Install-Package Nhibernate reference.
The database uses PostgreSQL.
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