SharePoint Online development options http://msdn.microsoft.com/ |
1. Open Microsoft Visual Studio 2010--> New Project --> Create a empty sharePoint Project-->
5. Now click on Solution Explorer
6. Add new item --> Add new WebPart
8. Write simple code for class
using System;
using System.ComponentModel;using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
namespace GodBlessUsWebPart.GodBlessUsWebPart
{
[ToolboxItemAttribute(false)]
public class GodBlessUsWebPart : WebPart
{
protected override void CreateChildControls()
{
Table tb = new Table();
this.Controls.Add(tb);
TableRow tbRow = new TableRow();
tb.Rows.Add(tbRow);
TableCell tbCell = new TableCell();
tbRow.Cells.Add(tbCell);
Label lbHello = new Label();
tbCell.Controls.Add(lbHello);
lbHello.Text = "Hello there, God bless us! Chào bạn, Thiên Chúa chúc phúc cho bạn! Bonjour à tous, Dieu nous bénisse!";
}
}
}
9. Rebuild project
10. Package project 15. Click back on Solutions
16. Click on Upload Solution
17. Click on Browse...
19. Click OK to Upload
20. Click on Activate to active solution GodBlessUsWebPart
21. GodBlessUsWebPart solution already to use
22. Edit a page
23. Click Insert
24. Click on More Web Parts
25. Click on GodBlessUsWebPart then click Add
26. Exceeded daily resource usage quota
27. We must wait until the resource usage quota available for the site collection or can be add the webPart to another site collection to use (Chúng ta phải đợi cho đến khi có hạn mức sử dụng mới với site collection này hay có thể add GodBlessWebPart solution này vào một site collection khác để sử dụng)
28. The GodBlessUsWebPart look like
Dowload Solution file: GodBlessUsWebPart.wsp
Download source cod: GodBlessUsWebPart.zip
Sandboxed solution development in SharePoint Online http://msdn.microsoft.com/ |
SharePoint client object model architecture http://msdn.microsoft.com/ |
No comments:
Post a Comment