本文整理汇总了C#中System.Web.UI.WebControls.WebParts.WebPartZoneBase.HelpVerb属性的典型用法代码示例。如果您正苦于以下问题:C# WebPartZoneBase.HelpVerb属性的具体用法?C# WebPartZoneBase.HelpVerb怎么用?C# WebPartZoneBase.HelpVerb使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类System.Web.UI.WebControls.WebParts.WebPartZoneBase
的用法示例。
在下文中一共展示了WebPartZoneBase.HelpVerb属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Page_Load
//引入命名空间
using System;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
public partial class WebPartZoneBase_verbs : System.Web.UI.Page
{
protected void Page_Load(Object sender, EventArgs e)
{
if (WebPartZone1.WebParts.Count == 0)
Table1.Visible = false;
else
Table1.Visible = true;
// Enable all verbs on the first page load.
if (!IsPostBack)
{
foreach (ListItem item in CheckBoxList1.Items)
item.Selected = true;
CheckBoxList1_SelectedItemIndexChanged(sender, e);
}
}
protected void CheckBoxList1_SelectedItemIndexChanged(Object sender, EventArgs e)
{
foreach (ListItem item in CheckBoxList1.Items)
{
WebPartVerb theVerb;
switch (item.Value)
{
case "close":
theVerb = WebPartZone1.CloseVerb;
break;
case "export":
theVerb = WebPartZone1.ExportVerb;
break;
case "delete":
theVerb = WebPartZone1.DeleteVerb;
break;
case "minimize":
theVerb = WebPartZone1.MinimizeVerb;
break;
case "restore":
theVerb = WebPartZone1.RestoreVerb;
break;
default:
theVerb = null;
break;
}
if (item.Selected)
theVerb.Enabled = true;
else
theVerb.Enabled = false;
}
}
}