首页 技术 正文
技术 2022年11月15日
0 收藏 661 点赞 4,101 浏览 3812 个字

CSS代码:

 body
{
font-size:11pt;
font-family:宋体;
}
.mainTitle
{
font-size:11pt;
font-weight:bold;
font-family:宋体;
}
.commonText
{
font-size:11pt;
font-family:宋体;
}
.littleMainTitle
{
font-size:10pt;
font-weight:bold;
font-family:宋体;
}
.TopTitle
{
border:0px;
font-size:10pt;
font-weight:bold;
text-decoration:none;
color:Black;
display:inline-block;
width:%;
}
.SelectedTopTitle
{
border:0px;
font-size:10pt;
text-decoration:none;
color:Black;
display:inline-block;
width:%;
background-color:White;
}
.ContentView
{
border:0px;
padding:3px 3px 3px 3px;
background-color:White;
display:inline-block;
width:390px;
}
.SepBorder
{
border-top-width:0px;
border-left-width:0px;
font-size:1px;
border-bottom:Gray 1px solid;
border-right-width:0px;
}
.TopBorder
{
border-right: Gray 1px solid;
border-top:Gray 0px solid;
border-left:Gray 1px solid;
border-bottom:Gray 1px solid;
height:%;
width:%;
}
.SelectedTopBorder
{
border-right: Gray 1px solid;
border-top:Gray 1px solid;
background:none transparent scroll repeat % %;
border-left:Gray 1px solid;
color:Black;
border-bottom: Gray 0px solid;
}

aspx代码:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MultiView控件.aspx.cs" Inherits="WebApplication1.复合控制和模板页.MultiView控件" %><!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>
<link href="../Styles/01.css" rel="external nofollow" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<div>
<fieldset style="width:400px";>
<legend>MultiView应用例子</legend>
<table cellpadding="" cellspacing="" width="100%" border="">
<tr>
<td>
<table id="Table1" runat="server"
cellpadding="" cellspacing=""
width="100%" border="">
<tr style="height:22px">
<td class="SelectedTopBorder" id="Cell1" align="center" style="width:80px;">
<asp:LinkButton ID="LButtonCompany" runat="server"
OnClick="LButtonCompany_Click">公司介绍</asp:LinkButton>
</td>
<td class="SepBorder" style="width:2px; height:22px;"></td>
<td class="TopBorder" id="Cell2" align="center" style="width:80px;">
<asp:LinkButton ID="LButtonProduct" runat="server"
OnClick="LButtonProduct_Click">产品介绍</asp:LinkButton></td> <td class="SepBorder" style="width:2px; height:22px;"></td>
<td class="TopBorder" id="Cell3" align="center" style="width:80px;">
<asp:LinkButton ID="LButtonContact" runat="server"
OnClick="LButtonContact_Click">联系我们</asp:LinkButton></td>
<td class="SepBorder" style="width:2px; height:22px;"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table class="ContentBorder" cellpadding=""
cellspacing="" width="100%">
<tr>
<td valign="top">
<asp:MultiView ID="mvCompany" runat="server" ActiveViewIndex="">
<asp:View ID="View1" runat="server">
我们公司是一个正在上升时期的公司。公司目前有中科院计算机院士3人,博士后32人,
博士63人,研究生120人,本科生356人,具有非常强大的研发实力。
</asp:View>
<asp:View ID="View2" runat="server">
我们有丰富的产品线,还可以为用户单独制定。目前CMS文章发布系统,CRM客户资源关系管理系统,
OA自动办公化系统,正在研发的软件有GSP车辆定位导航系统及工作制度系统。
</asp:View>
<asp:View ID="View3" runat="server">
本公司热烈欢迎技术界和销售界的精英加入我们,客服电话123445.
</asp:View>
</asp:MultiView>
</td>
</tr>
</table>
</td>
</tr>
</table>
</fieldset>
</div>
</form>
</body>
</html>

CS代码:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;namespace WebApplication1.复合控制和模板页
{
public partial class MultiView控件 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{ } protected void LButtonCompany_Click(object sender, EventArgs e)
{
mvCompany.ActiveViewIndex = ;
Cell1.Attributes["class"] = "SelectedTopBorder";
Cell2.Attributes["class"]="TopBorder";
Cell3.Attributes["class"] = "TopBorder";
} protected void LButtonProduct_Click(object sender, EventArgs e)
{
mvCompany.ActiveViewIndex = ;
Cell1.Attributes["class"] = "TopBorder";
Cell2.Attributes["class"] = "SelectedTopBorder";
Cell3.Attributes["class"] = "TopBorder";
} protected void LButtonContact_Click(object sender, EventArgs e)
{
mvCompany.ActiveViewIndex = ;
Cell1.Attributes["class"] = "TopBorder";
Cell2.Attributes["class"] = "TopBorder";
Cell3.Attributes["class"] = "SelectedTopBorder";
} }
}
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,499
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,912
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,746
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,503
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:8,142
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:5,305