MSPlus-ToolBar Control

Source: Internet
Author: User

This is a ToolBar control. Is it similar to the tool bar of Vs. Net ?!, However, it is in the B/S structure and is one of the MSPLUS controls.

As follows: You can directly write it in the Label to define the TOOLBAR and its sub-item <: MenuItem Label = "Edit project" ID = "X7">
<PC3: MenuItem Label = "delete" ID = "X10" LeftIcon = "icon_delete" LeftIconOver = "icon_delete_over"> </PC3: MenuItem>
<PC3: MenuItem Image = "gray"> </PC3: MenuItem>
<PC3: MenuItem Label = "display member" ID = "X11" LeftIcon = "icon_listMembers" LeftIconOver = "icon_listMembers_over"
Disable = "true">
<PC3: MenuItem Label = "new" ID = "X12" LeftIcon = "icon_new" LeftIconOver = "icon_new_over"> </PC3: MenuItem>
<PC3: MenuItem Label = "ID" ID = "X13" LeftIcon = "icon_new" LeftIconOver = "icon_new_over"> </PC3: MenuItem>
</PC3: MenuItem>
</PC3: MenuItem>

At the same time, you can bind data directly with DataTable or Xml.

Protected MSPlus. Web. UI. WebControls. MSMenu MSMenu1;

Private void Page_Load (object sender, System. EventArgs e)
{
// Place user code here to initialize the Page]
MSMenu1.DataSource = Server. MapPath ("NewMenuData. xml ");
MSMenu1.DataBind ();

}

<? Xml version = "1.0" encoding = "UTF-8"?>
<MSPlus>
<MenuConfig> </MenuConfig>
<MenuData>
<MenuItem Label = "File" ID = "X1">
<MenuItem Label = "New" ID = "X2" LeftIcon = "icon_new.gif" LeftIconOver = "icon_new_over.gif"/>
<MenuItem Label = "Open" LeftIcon = "icon_open.gif" LeftIconOver = "icon_open_over.gif">
<MenuItem Label = "From Disk" ID = "X3" LeftIcon = "icon_new.gif" LeftIconOver = "icon_new_over.gif"/>
</MenuItem>
</MenuItem>
<MenuItem Label = "Edit" ID = "X4">
<MenuItem Label = "File" ID = "X1"/>
<MenuItem Label = "File" ID = "X1"/>
<MenuItem Image = "gray.gif"/>
<MenuItem Label = "File" ID = "X1"/>
<MenuItem Label = "File" ID = "X1">
<MenuItem Label = "New" ID = "X2" LeftIcon = "icon_new.gif" LeftIconOver = "icon_new_over.gif"/>
<MenuItem Label = "Open" LeftIcon = "icon_open.gif" LeftIconOver = "icon_open_over.gif">
<MenuItem Label = "From Disk" ID = "X3" LeftIcon = "icon_new.gif" LeftIconOver = "icon_new_over.gif">
<MenuItem Label = "File" ID = "X1">
<MenuItem Label = "New" ID = "X2" LeftIcon = "icon_new.gif" LeftIconOver = "icon_new_over.gif"/>
<MenuItem Label = "Open" LeftIcon = "icon_open.gif" LeftIconOver = "icon_open_over.gif">
<MenuItem Label = "From Disk" ID = "X3" LeftIcon = "icon_new.gif" LeftIconOver = "icon_new_over.gif"/>
</MenuItem>
</MenuItem>
</MenuItem>
</MenuItem>
</MenuItem>
</MenuItem>
</MenuData>
</MSPlus>

It supports unlimited layers. This function allows you to save attributes and statuses of child controls. You can dynamically add or delete a subitem or modify its attributes at runtime.

Subitem events are passed through the bubbling method layer by layer. You only need to add a Click event! Private void MSMenu1_MenuItemClick (object sender, MSPlus. Web. UI. WebControls. MenuItemClickEventArgs e)
{
Response. Write ("Click Item Label:" + e. EventItem. Label );
}

Today, I went out for a stroll and bought a white shirt (I am black, but it's pretty cool to wear white ). It took a long time to visit and I was a little tired. I had no physical strength to write about the opening ceremony of the Olympic Games. I will continue to write more details about the ToolBar.

Today we will introduce a general introduction to DataList and ToolBar. I will introduce other controls in MSPlus to you in the future. I hope you can support me!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.