zoukankan      html  css  js  c++  java
  • ASP.Net 2.0 C# 选项卡效果

    页面代码:

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Htgl_DataAdmin_Default" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>无标题页</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
       
        <asp:Menu ID ="Menu1" Width="168px" runat ="server" Orientation="horizontal" StaticEnableDefaultPopOutImage="false" OnMenuItemClick ="Menu1_MenuItemClick">
        <Items >
        <asp:MenuItem Text ="Tab1" Value ="0"></asp:MenuItem>
        <asp:MenuItem   Text ="Tab2" Value ="1"></asp:MenuItem>
        <asp:MenuItem   Text ="Tab3" Value ="2"></asp:MenuItem>
        </Items>
        </asp:Menu>
        <asp:MultiView ID ="MultiView1" runat ="server" ActiveViewIndex ="0">
        <asp:View ID ="Tab1" runat ="server" >
        <table style ="width :600px; height:400px;" cellpadding ="0" cellspacing ="0">
        <tr valign ="top">
        <td class ="TabArea" style ="600px">
        TAB VIEW 4
    INSERT YOUR CONENT IN HERE
    CHANGE SELECTED IMAGE URL AS NECESSARY
        </td>
        </tr>
        </table>
        </asp:View>
        <asp:View ID ="Tab2" runat ="server" >
        <table style ="width :600px; height :400px;" cellpadding ="0" cellspacing ="0">
        <tr valign ="top" >
        <td class ="TabArea" style ="width :600px">
        TAB VIEW 2
    INSERT YOUR CONENT IN HERE
    CHANGE SELECTED IMAGE URL AS NECESSARY
        </td>
        </tr>
        </table>
        </asp:View>
        <asp:View ID ="Tab3" runat="server" >
        <table style =" 600px; height :400px" cellpadding ="0" cellspacing ="0">
        <tr valign ="top">
        <td class ="TabArea" style ="width :600px">
            TAB VIEW 54INSERT YOUR CONENT IN HERE
    CHANGE SELECTED IMAGE URL AS NECESSAR
        </td>
        </tr>
        </table>
        </asp:View>
        </asp:MultiView>
        </div>
        </form>
    </body>
    </html>

    C#代码:

    protected void Menu1_MenuItemClick(object sender, MenuEventArgs e)
        {
            MultiView1.ActiveViewIndex = Convert.ToInt32(Menu1.SelectedValue);
           

        }

  • 相关阅读:
    gitlab+gerrit+jenkins持续集成框架
    多线程自动翻页爬虫
    爬虫超级简单入门
    完整开发流程管理提升与系统需求分析过程 随堂笔记(day 1) 【2019/10/14】
    Logistic Regression
    cmdb项目-2
    cmdb项目-3
    cmdb全总结
    crm-1
    crm-2
  • 原文地址:https://www.cnblogs.com/zjw/p/1233575.html
Copyright © 2011-2022 走看看