如何修改二级菜单标签在C#网页应用程序 [英] How to modify tabs for the secondary menu in a c# web page application

查看:85
本文介绍了如何修改二级菜单标签在C#网页应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用ASP:菜单和​​ASP:多视角来获取工作正常,但该选项卡看起来像一个长句子我的页面上的标签功能。我想这样做的标签样的边框或anythiing之间存在一些seperations。我是新来这个标签功能。我使用2013的Visual Studio了。
任何帮助将AP preciated。
请参阅我的选项卡的附加的图像,并给我一些建议。

i am using asp:menu and asp:multiview to get the tab feature on my page that works fine but the tab looks like a long sentence . I would like to do some seperations between the tabs kind of a border or anythiing . I am new to this tab features. I am using 2013 Visual Studio too. Any help will be appreciated. please see the attached image of my tabs and give me some suggestions.

我的code是这样的。

My code goes like this .

        <asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" StaticEnableDefaultPopOutImage="false" OnMenuItemClick="Menu1_MenuItemClick" >
        <Items>
            <asp:MenuItem ImageUrl="" Text="Driver" Value="0" Selected="true"></asp:MenuItem>
            <asp:MenuItem ImageUrl="" Text="Vehicle" Value="1"></asp:MenuItem>
            <asp:MenuItem ImageUrl="" Text="SOS" Value="2"></asp:MenuItem>
             <asp:MenuItem ImageUrl="" Text="ACE" Value="3"></asp:MenuItem>
        </Items>
        <StaticSelectedStyle BackColor="Silver" />
    </asp:Menu>
    <asp:MultiView ID="multiView1" runat="server" ActiveViewIndex="0">
       <asp:View ID="Tab3" runat="server">
            <asp:Table runat="server" Width="100%" Height="100%" CellPadding="0" CellSpacing="0">
                <asp:TableRow VerticalAlign="Top">
                    <asp:TableCell CssClass="TabArea" Width="100%" BackColor="Silver">
                        <br /> <br />
                        tab view 3 .this is reserved for SOS .
                    </asp:TableCell>
                </asp:TableRow>
            </asp:Table>
        </asp:View>
    </asp:MultiView>

我想获得我作为TAB1菜单| TAB2 | TAB3
现在我的菜单看起来像Tab1Tab2Tab3

I would like to get my menu as Tab1|Tab2|Tab3 right now my menu looks like Tab1Tab2Tab3

推荐答案

我必须做同样的属性并没有太多的选择,我可以玩的,所以我只是一个没有危害招上来编码。
很抱歉,如果我做的东西很愚蠢的,我在这里是一个新鲜的蜜蜂,这提供我的要求。
我的code将是:

I had to do the same and the properties didn't have much options that i can play around with so i just came up with a not harmful trick in coding. Sorry if i am doing something so stupid, i am a fresh bee here and this served my requirement. my code would be :

<asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" StaticEnableDefaultPopOutImage="false" OnMenuItemClick="Menu1_MenuItemClick" >
    <Items>
        <asp:MenuItem ImageUrl="" Text="Driver" Value="0" Selected="true"></asp:MenuItem>
        <asp:MenuItem Text="|" Value="0" Selectable="false"></asp:MenuItem>
        <asp:MenuItem ImageUrl="" Text="Vehicle" Value="1"></asp:MenuItem>
        <asp:MenuItem Text="|" Value="2" Selectable="false"></asp:MenuItem>            
        <asp:MenuItem ImageUrl="" Text="SOS" Value="3"></asp:MenuItem>
        <asp:MenuItem Text="|" Value="4" Selectable="false"></asp:MenuItem>
        <asp:MenuItem ImageUrl="" Text="ACE" Value="5"></asp:MenuItem>   
        <asp:MenuItem Text="|" Value="6" Selectable="false"></asp:MenuItem>
    </Items>
    <StaticSelectedStyle BackColor="Silver" />

</asp:Menu>

这让我添加菜单项和mousehover之间的分隔符的符号|将永远无法选择的方式。

This helped me adding a seperator between the menuitems and the mousehover on the symbol | will be not selectable way always.

希望它会帮助你。有一个伟大的时间!

Hope it will help you too. Have a great time !

这篇关于如何修改二级菜单标签在C#网页应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆