刚刚为SharePoint创建了一个简单的Visual WebPart。还没有代码。我想要的只是“Whatever”-Property显示在该webpart的Propertypane中。但事实并非如此。
(甚至没有显示类别)
我在这里做错了什么?
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;
using Microsoft.SharePoint.WebPartPages;
using WebPart = System.Web.UI.WebControls.WebParts.WebPart;
namespace tqUpdateOrder.ListOrder
{
[ToolboxItemAttribute(false)]
public class ListOrder : WebPart
{
// Visual Studio might automatically update this path when you change the Visual Web Part project item.
private const string _ascxPath = @"~/_CONTROLTEMPLATES/15/tqUpdateOrder/ListOrder/ListOrderUserControl.ascx";
private string _whatever;
[Browsable(true),FriendlyName("oink"),WebBrowsable(true),WebDisplayName("OINK OINK"),Category("HIER BIN ICH")]
public string Whatever
{
get { return _whatever; }
set { _whatever = value; }
}
protected override void CreateChildControls()
{
Control control = Page.LoadControl(_ascxPath);
Controls.Add(control);
}
}
}