本文整理汇总了C#中System.Web.UI.WebControls.Menu类的典型用法代码示例。如果您正苦于以下问题:C# Menu类的具体用法?C# Menu怎么用?C# Menu使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Menu类属于System.Web.UI.WebControls命名空间,在下文中一共展示了Menu类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: setMenuData
protected void setMenuData()
{
Menu menu = new Menu();
MenuItem item;
item = new MenuItem();
item.Text = "Home Page";
item.Value = "valueHomePage";
menu.Items.Add(item);
item = null;
item = new MenuItem();
item.Text = "Contact Us";
item.Value = "valueContactUs";
menu.Items.Add(item);
item = null;
item = new MenuItem();
item.Text = "Productions";
item.Value = "valueProductions";
menu.Items.Add(item);
item = null;
item = new MenuItem();
item.Text = "Compare";
item.Value = "valueCompare";
menu.Items.Add(item);
item = null;
item = new MenuItem();
item.Text = "Links";
item.Value = "valueLinks";
menu.Items.Add(item);
item = null;
}
开发者ID:salahmyn,项目名称:galileovietnam,代码行数:35,代码来源:LeftMenuControl.ascx.cs
示例2: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
Menu navbar = new Menu(nav);
if (!Page.IsPostBack)
{
dt = conec.Productos();
DataList1.DataSource = dt;
DataList1.DataBind();
}
}
开发者ID:ramonramirezz,项目名称:TechStore,代码行数:10,代码来源:productos.aspx.cs
示例3: Page_Load
//DataTable dt = new DataTable();
protected void Page_Load(object sender, EventArgs e)
{
Menu navbar = new Menu(nav);
//if (!Page.IsPostBack)
//{
//dt = conec.Carrito();
//GridView1.DataSource = dt;
//GridView1.DataBind();
//}
}
开发者ID:ramonramirezz,项目名称:TechStore,代码行数:12,代码来源:carrito.aspx.cs
示例4: MenuBindingsEditorForm
public MenuBindingsEditorForm(IServiceProvider serviceProvider, System.Web.UI.WebControls.Menu menu, MenuDesigner menuDesigner) : base(serviceProvider)
{
this._menu = menu;
this.InitializeComponent();
this.InitializeUI();
foreach (MenuItemBinding binding in this._menu.DataBindings)
{
MenuItemBinding clone = (MenuItemBinding) ((ICloneable) binding).Clone();
menuDesigner.RegisterClone(binding, clone);
this._bindingsListView.Items.Add(clone);
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:12,代码来源:MenuBindingsEditorForm.cs
示例5: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
Models.PoliklinikEntities4 p=new Models.PoliklinikEntities4();
var res = from c in p.UrunKategori select new {Adi = c.Adi };
Menu m = new Menu();
foreach (var item in res.ToList())
{
MenuItem l=new MenuItem();
l.Value=item.Adi;
m.Items.Add(l);
Menu1.Items.Add(l);
}
}
开发者ID:tamerin1,项目名称:e-commerce,代码行数:14,代码来源:WebForm1.aspx.cs
示例6: bindMenuProLb
protected void bindMenuProLb(Menu MenuProLb)
{
SQLHelper.Setup();
List<DXLb> lbs = SQLHelper.GetEntities<DXLb>(" IsDeleted=0 AND parentid = 0 Order By OrderId");
foreach (DXLb lb in lbs)
{
MenuItem menuNode = new MenuItem();
menuNode.Text = lb.LbName;
menuNode.Value = lb.Id.ToString();
menuNode.NavigateUrl = "Prod.aspx?lbid=" + lb.Id;
menuNode.Enabled = true;
MenuProLb.Items.Add(menuNode);
parentid_ = lb.Id;
addChildMenu(menuNode);
}
}
开发者ID:uwitec,项目名称:dx-shopsys,代码行数:16,代码来源:LeftMenu.aspx.cs
示例7: SetearOpcionesConsultor
private void SetearOpcionesConsultor(Menu menuPrincipal)
{
SetearOpcionesGeneral(menuPrincipal);
menuPrincipal.Items.Remove(menuPrincipal.FindItem("Cliente"));
// Buscar el item Vehiculo
MenuItem menuVehiculo = menuPrincipal.FindItem("Vehiculo");
// Buscar cada subitem del item Vehiculo
MenuItem venderVehiculo = menuPrincipal.FindItem("Vehiculo/VenderVehiculo");
MenuItem registrarVehiculo = menuPrincipal.FindItem("Vehiculo/RegistrarVehiculo");
MenuItem modificarVehiculo = menuPrincipal.FindItem("Vehiculo/ModificarVehiculo");
MenuItem caracteristicasVehiculo = menuPrincipal.FindItem("Vehiculo/CaracteristicasVehiculo");
MenuItem eliminarVehiculo = menuPrincipal.FindItem("Vehiculo/EliminarVehiculo");
// Eliminar cada subitem del item Vehiculo
menuVehiculo.ChildItems.Remove(venderVehiculo);
menuVehiculo.ChildItems.Remove(registrarVehiculo);
menuVehiculo.ChildItems.Remove(modificarVehiculo);
menuVehiculo.ChildItems.Remove(caracteristicasVehiculo);
menuVehiculo.ChildItems.Remove(eliminarVehiculo);
}
开发者ID:nMoschen,项目名称:NET_TP2,代码行数:23,代码来源:Home.aspx.cs
示例8: SetDataBindings
void SetDataBindings (Menu menu) {
MenuItemBinding b = new MenuItemBinding ();
b.DataMember = "node";
b.EnabledField = "enabled";
b.Enabled = false;
b.ImageUrlField = "img";
b.ImageUrl = "img#default";
b.NavigateUrlField = "url";
b.NavigateUrl = "url#default";
b.PopOutImageUrlField = "popoutimg";
b.PopOutImageUrl = "popoutimg#default";
b.SelectableField = "selectable";
b.Selectable = false;
b.SeparatorImageUrlField = "separatorimg";
b.SeparatorImageUrl = "separatorimg#default";
b.TargetField = "target";
b.Target = "target#default";
b.FormatString = "text#{0}";
b.TextField = "text";
b.Text = "text#default";
b.ToolTipField = "tooltip";
b.ToolTip = "tooltip#default";
b.ValueField = "value";
b.Value = "value#default";
menu.DataBindings.Add (b);
b = new MenuItemBinding ();
b.DataMember = "root";
b.Enabled = false;
b.ImageUrl = "img#root";
b.NavigateUrl = "url#root";
b.PopOutImageUrl = "popoutimg#root";
b.Selectable = false;
b.SeparatorImageUrl = "separatorimg#root";
b.Target = "target#root";
b.Text = "text#root";
b.ToolTip = "tooltip#root";
b.Value = "value#root";
menu.DataBindings.Add (b);
b = new MenuItemBinding ();
b.DataMember = "extra1";
b.Text = "text#extra1";
menu.DataBindings.Add (b);
b = new MenuItemBinding ();
b.DataMember = "extra2";
b.Value = "value#extra2";
menu.DataBindings.Add (b);
b = new MenuItemBinding ();
b.DataMember = "extra3";
b.TextField = "text";
b.ValueField = "value";
menu.DataBindings.Add (b);
b = new MenuItemBinding ();
b.DataMember = "extra4";
b.TextField = "text";
b.Text = "text#default";
b.ValueField = "value";
menu.DataBindings.Add (b);
b = new MenuItemBinding ();
b.DataMember = "extra5";
b.TextField = "text";
b.Value = "value#default";
b.ValueField = "value";
menu.DataBindings.Add (b);
}
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:70,代码来源:MenuTest.cs
示例9: fillMenu
private static void fillMenu (Menu m) {
m.Items.Clear ();
m.Items.Add (new MenuItem ());
m.Items [0].ChildItems.Add (new MenuItem ());
m.Items [0].ChildItems.Add (new MenuItem ());
m.Items [0].ChildItems [0].ChildItems.Add (new MenuItem ());
}
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:7,代码来源:MenuTest.cs
示例10: GetClientEvent
string GetClientEvent (Menu owner, MenuItem item)
{
if (owner == null)
owner = Owner;
Page page = owner.Page;
ClientScriptManager csm = page != null ? page.ClientScript : null;
if (csm == null)
return String.Empty;
return csm.GetPostBackClientHyperlink (owner, item.Path, true);
}
开发者ID:Profit0004,项目名称:mono,代码行数:13,代码来源:BaseMenuRenderer.cs
示例11: GetArrowResourceUrl
public string GetArrowResourceUrl (Menu owner)
{
Page page = owner.Page;
ClientScriptManager csm = page != null ? page.ClientScript : null;
if (csm != null)
return csm.GetWebResourceUrl (typeof (Menu), "arrow_plus.gif");
return null;
}
开发者ID:Profit0004,项目名称:mono,代码行数:9,代码来源:BaseMenuRenderer.cs
示例12: RenderItemHref
public virtual void RenderItemHref (Menu owner, HtmlTextWriter writer, MenuItem item)
{
if (!item.BranchEnabled)
writer.AddAttribute ("disabled", "true", false);
else if (!item.Selectable) {
writer.AddAttribute ("href", "#", false);
writer.AddStyleAttribute ("cursor", "text");
} else if (item.NavigateUrl != String.Empty) {
string target = item.Target != String.Empty ? item.Target : owner.Target;
string navUrl = owner.ResolveClientUrl (item.NavigateUrl);
writer.AddAttribute ("href", navUrl);
if (target != String.Empty)
writer.AddAttribute ("target", target);
} else
writer.AddAttribute ("href", GetClientEvent (owner, item));
}
开发者ID:Profit0004,项目名称:mono,代码行数:16,代码来源:BaseMenuRenderer.cs
示例13: BaseMenuRenderer
public BaseMenuRenderer (Menu owner)
{
if (owner == null)
throw new ArgumentNullException ("owner");
this.Owner = owner;
}
开发者ID:Profit0004,项目名称:mono,代码行数:7,代码来源:BaseMenuRenderer.cs
示例14: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
Menu navbar = new Menu(nav);
}
开发者ID:ramonramirezz,项目名称:TechStore,代码行数:4,代码来源:contacto.aspx.cs
示例15: SetearOpcionesGeneral
private void SetearOpcionesGeneral(Menu menuPrincipal)
{
// Remover los items que no son accesibles por el usuario
menuPrincipal.Items.Remove(menuPrincipal.FindItem("Empleado"));
menuPrincipal.Items.Remove(menuPrincipal.FindItem("Comision"));
}
开发者ID:nMoschen,项目名称:NET_TP2,代码行数:6,代码来源:Home.aspx.cs
示例16: SetOwner
/// <devdoc>
/// Sets the owner Menu of this item.
/// </devdoc>
internal void SetOwner(Menu owner) {
_owner = owner;
if (_selectDesired == +1) {
_selectDesired = 0;
Selected = true;
}
else if (_selectDesired == -1) {
_selectDesired = 0;
Selected = false;
}
foreach (MenuItem item in ChildItems) {
item.SetOwner(_owner);
}
}
开发者ID:uQr,项目名称:referencesource,代码行数:19,代码来源:MenuItem.cs
示例17: MenuItem
/// <devdoc>
/// Constructs a new MenuItem with the specified owner Menu
/// </devdoc>
internal MenuItem(Menu owner, bool isRoot)
: this() {
_owner = owner;
_isRoot = isRoot;
}
开发者ID:uQr,项目名称:referencesource,代码行数:8,代码来源:MenuItem.cs
示例18: MenuTableRenderer
public MenuTableRenderer (Menu owner)
: base (owner)
{
}
开发者ID:Profit0004,项目名称:mono,代码行数:4,代码来源:MenuTableRenderer.cs
示例19: IsDynamicItem
public abstract bool IsDynamicItem (Menu owner, MenuItem item);
开发者ID:Profit0004,项目名称:mono,代码行数:1,代码来源:BaseMenuRenderer.cs
示例20: IsDynamicItem
public override bool IsDynamicItem (Menu owner, MenuItem item)
{
if (owner == null)
throw new ArgumentNullException ("owner");
if (item == null)
throw new ArgumentNullException ("item");
return item.Depth + 1 > owner.StaticDisplayLevels;
}
开发者ID:Profit0004,项目名称:mono,代码行数:10,代码来源:MenuTableRenderer.cs
注:本文中的System.Web.UI.WebControls.Menu类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论