AjaxHelper is based on Ajax and UserControl. the MVC solution in the. Net environment is used to simplify Ajax-based Web development in the asp.net environment. AjaxHelper supports WebPart development in the SPS from version 0.4. In the SPS environment, an Ajax is used. ascx replaces Common Asp.. Net environment. aspx extends the interfaces WebPartUpdater and WebPartAppender (parameters are the same as Updater and Appender. For details, see AjaxHelper. js) This makes AjaxHelper an Ajax-based MVC solution that can be used in the common asp.net environment and the SPS environment.
For more background information about AjaxHelper, see AjaxHelper0.3 and AjaxHelperExample2.
Click here to download the source code and Examples
The compressed package contains AjaxHelper0.4 and the corresponding sample program For SPS. version 0.4 is fully compatible with version 0.3.
The provided examples demonstrate how to use WebPartUpdater and WebPartAppender.
The source code contains a cab package that can be directly deployed with stsadm, and a dwp file that can be directly used to import WebPart.
Example usage:
1. Copy the cab and dwp files to the local directory.
2. Run stsadm-o-addwppack-filename ajaxhel1_sps. cab on the command line.
3. log on to SPS, click Import Control on the modify page, select dwp file upload, drag the listed Control AjaxHelperSampleWebPart to your desired location, and close the page modification interface.
4. At this time, the WebPart should be running properly!
-----------------------------------------------------------------
P.S. Is about to change to work unit now. The next job may be dominated by SPS. This is my first WebPart. If you find any shortcomings, you are welcome to teach. For more information about the development of a basic WebPart, see the kubernetes kaneboy WalkThrough-WebPart series guide. Thank you very much!
In addition, some experience has been gained during the development and testing of this WebPart. The following is an example:
· No Request can be called in the background code of the WebPart or the UserControl embedded in the WebPart. form [] or Request. params []. Otherwise, a WebPart error will be reported. Therefore, for the Sps environment, you have to change the default post method submitted by AjaxHelper to the get method by Request. queryString [] Parameters
· In WebPart, the default permission does not seem to allow access to external websites in the background, such as downloading a remote webpage (in my example, I originally wanted to put a simple Rss reader, in the end, errors are always caused by unknown reasons. Therefore, give up and doubt the permission)
P.S. Again:
Because the machine in the house is too bad, I installed the SPS on a desktop, but the machine has too little memory and is not suitable for installing VS on this machine. NET, so my. NET for WebPart development, and the notebook does not want to install win2003 and SPS, so in this case, can we perform one-step WebPart debugging? What should we do? High finger points!
Who would like to introduce to the SPS team?
Enjoy!
// End the article