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);
           

        }

  • 相关阅读:
    嵌入式软件设计第7次实验报告
    自我介绍
    软工 需求分析
    微软小娜app的使用
    嵌入式软件设计第12次实验报告
    嵌入式软件设计第11次实验报告
    嵌入式软件设计第十次
    嵌入式软件设计第九次
    软件工程需求分析
    嵌入式软件设计第8次实验
  • 原文地址:https://www.cnblogs.com/zjw/p/1233575.html
Copyright © 2011-2022 走看看