First to the company, from the original ASP.net development turned to SharePoint (SP) development, personal feeling and before the difference is small, today with the implementation of the SP asynchronous load data encountered a problem, before the ASP.net next is to use Jquery.ajax +. Ashx to achieve , but when creating items under the SP Wood has found that there are ashx pages can be created, that SP how to implement asynchronous loading data in the following ways:
1. Create the MyModule class to implement IHttpModule excuses and configure the node under the main Web.config, add event handling inside, add the class MyHandler implement the IHttpHandler interface, and then the corresponding request path can be handled by the MyHandler class.
2. The use of WebPart, specifically not in-depth study, the visual is to write a control to achieve the requested data, to be further understanding ...
3. Use SP JS object model, this is not very clear, after all, just contact SP only 2 days.
4. The simplest and easiest to understand the new application page, delete all the asp:content nodes under the ASPX page (that is, the front end has no content), and then the code is as follows:
protected void Page_Load (object sender, EventArgs e)
{
String type = request.querystring[' type ']. ToString (). Trim ();
if (string. IsNullOrEmpty (type))
{
response.end ();
return;
}
Switch (type) {case
"one":
Response.Write ("1111111");
Response.End ();
return;
Case "":
Response.Write ("2222222");
Response.End ();
return;
Default:
Response.End ();
return;
}
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/web/sharepoint/