TabStrip和MultiPage的安装和使用

1.下载IEWebControls.exe并安装,在C:/Program Files/IE Web Controls/下有文件build.bat
2.使用开始->所有程序->Miscrosoft Visual Studio .NET 2003->Visual Studio .NET Tools的
自带工具Visual Studio .NET 2003 Command Prompt,在dos窗口里执行build.bat,在
C:/Program Files/IE Web Controls/build下生成Microsoft.Web.UI.WebControls.dll
c:/Inetpub/wwwroot/下创建目录webctrl_client/1_0dos窗口里
执行C:/Program Files/IE Web Controls 目录下README.txt文件里的
xcopy /s /i ./build/Runtime c:/Inetpub/wwwroot/webctrl_client/1_0 /y命令

3.点vb.net的Tools->Add/Remove Toolbox Items...,在弹出的窗口Customize Toolbox的
.NET Framework Components里,点Browse...,选择生成的Microsoft.Web.UI.WebControls.dll
4.在Toolbox的Web Forms选项卡里就会出现4个新的控件TabStrip、MultiPage、Toolbar、TreeView
5.选择TabStrip、MultiPage放在WebForm上,命名为TabStrip1、MultiPage1,点TabStrip1的items
选项添加2个tab,在TabStrip1的TargetID里输入MultiPage1,TabStrip1和MultiPage1的关联完成了
6.在MultiPage1的前台代码里的<iewc:multipage id="MultiPage1"...></iewc:multipage>之间添加代码
<iewc:pageview id="page1">
<asp:Button id="Button1" runat="server" Text="Button1">
</asp:Button>
</iewc:pageview>
<iewc:pageview id="page2">
<asp:Button id="Button2" runat="server" Text="Button2">
</asp:Button>
</iewc:pageview>
7.在后台代码里注册这两个button
Protected WithEvents Button1 As System.Web.UI.WebControls.Button
Protected WithEvents Button2 As System.Web.UI.WebControls.Button
8.为这两个button添加事件
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
....
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
.....
End Sub

你可能感兴趣的:(page)