这是我这两天做的
<%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls, Version=1.0.2.226, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Page language="c#" Codebehind="Top.aspx.cs" AutoEventWireup="true" Inherits="myoa.WebForm3" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WebForm3</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<FONT face="宋体">
<iewc:Toolbar id="Toolbar1" autopostback="true" OnButtonClick="checkTest" style="Z-INDEX: 101; LEFT: 0px; POSITION: absolute; TOP: 0px" runat="server" Width="406px" Height="16px" Font-Size="9pt" ForeColor="Black" BorderStyle="Solid" BorderWidth="2px">
<iewc:ToolbarButton id="button1" Text="首页" ImageUrl="images\book.gif"></iewc:ToolbarButton>
<iewc:ToolbarButton id="button2" Text="增加类别" ImageUrl="images\folderOpen.gif"></iewc:ToolbarButton>
<iewc:ToolbarButton id="button3" Text="修改人员" ImageUrl="images\folderOpen.gif"></iewc:ToolbarButton>
<iewc:ToolbarButton id="button4" Text="查询信息" ImageUrl="images\book.gif"></iewc:ToolbarButton>
<iewc:ToolbarButton id="button5" Text="统计资料" ImageUrl="images\folderClosed.gif"></iewc:ToolbarButton>
<iewc:ToolbarDropDownList AutoPostBack="True" Font-Names="vb.net,c#,javascript,vbscript,html,asp.net">
<asp:ListItem Value="GDI+" Selected="True">GDI+</asp:ListItem>
<asp:ListItem Value="Duard Chart">Duard Chart</asp:ListItem>
<asp:ListItem Value="OWC">OWC</asp:ListItem>
</iewc:ToolbarDropDownList>
<iewc:ToolbarButton Text="图形列表" ImageUrl="images\folderClosed.gif"></iewc:ToolbarButton>
</iewc:Toolbar></FONT>
</form>
</body>
</HTML>using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;namespace myoa
{
/// <summary>
/// WebForm3 的摘要说明。
/// </summary>
public class WebForm3 : System.Web.UI.Page
{
protected Microsoft.Web.UI.WebControls.Toolbar Toolbar1;

private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
}
public void checkTest (Object sender, EventArgs e) 
{
Microsoft.Web.UI.WebControls.ToolbarButton tb = new Microsoft.Web.UI.WebControls.ToolbarButton();
string exp="";
if (sender is Microsoft.Web.UI.WebControls.ToolbarButton) 
{
tb=(Microsoft.Web.UI.WebControls.ToolbarButton)sender;
exp=tb.ID;
}
if (exp=="button1")
Page.Response.Write("<"+"script>javascript:window.open('WelCome.aspx','mainFrame')</"+"script>");
else if(exp=="button2")
Page.Response.Write("<"+"script>javascript:window.open('ClassAdd.aspx','mainFrame')</"+"script>");
else if(exp=="button3")
Page.Response.Write("<"+"script>javascript:window.open('UserModify.aspx','mainFrame')</"+"script>");
else if(exp=="button4")
Page.Response.Write("<"+"script>javascript:window.open('Query.aspx','mainFrame')</"+"script>");
else if(exp=="button5")
Page.Response.Write("<"+"script>javascript:window.open('WelCome.aspx','mainFrame')</"+"script>"); //Page.Response.Redirect(window.open('AddNewNode.aspx','mainFrame')";
//Response.Write( "Clicked on object id='" +exp + "'");
} #region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN:该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}

/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{    
this.Load += new System.EventHandler(this.Page_Load); }
#endregion
}
}