ASP.NET
  Home arrow ASP.NET arrow Page 3 - IE Web Controls in VB.NET
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

IE Web Controls in VB.NET
By: Himanshu Dhami
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 28
    2003-02-25

    Table of Contents:
  • IE Web Controls in VB.NET
  • TreeView Control
  • TabStrip Control
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    IE Web Controls in VB.NET - TabStrip Control


    (Page 3 of 4 )

    Now let’s look at how to use the TabStrip control.

    The code in the ASPX file is similar to the code for TreeView control, here it is:

    <iewc:tabstrip id=mytabstrip accessKey="<%# Page %>" runat="server" Width="338px" Height="28px" AutoPostBack="True" TabSelectedStyle="background-color:#ffffff;color:#000000;" TabHoverStyle="background-color:#777777;" TabDefaultStyle="background-color:#668274;font-family:verdana;font-weight:bold;font-size:8pt;color:#ffffff;width:79;height:21;text-align:center;">
       <iewc:Tab Text="tab1"></iewc:Tab>
       <iewc:Tab Text="tab2"></iewc:Tab>
       <iewc:Tab Text="tab3"></iewc:Tab>
       <iewc:Tab Text="tab4"></iewc:Tab>
    </iewc:tabstrip>


    The code above will create 4 tabs in the page. Now comes time to add functionality to these tabs.

    The most common functionality which we have seen in something like this is that a user clicks different tabs and pages corresponding to the tabs are displayed to the user. I was trying to implement this TabStrip for similar functionality in my project but I was disappointed to see that there is not property or method like Treenode.NavigateUrl. So I created an iframe in the page like this:

    <iframe id=applnname style="WIDTH: 100.33%; HEIGHT: 175.81%" hspace=0 vspace=0 src="<%=sIFrameSrc%>" frameBorder=no height="100%">
    </iframe>


    This src="<%=sIFrameSrc%>" is important as in the code behind page we will populate frame source so that we can get required functionality of switching between different pages.

    When you click on different tabs mytabstrip_onSelectedIndexChange is called so this is the place where we can change srcframe to different pages.

    Private Sub mytabstrip_onSelectedIndexChange(ByVal sender As Object, ByVal e As System.EventArgs) Handles mytabstrip.SelectedIndexChange
      Dim sdata As String
      Select Case mytabstrip.SelectedIndex
        Case 0
          tabname = "tab1"
          sIFrameSrc = "http://www.oxx.no"
        Case 1
          tabname = "tab2"
          sIFrameSrc = "http://www.yahoo.co,"
        Case 2
          tabname = "tab3"
          sIFrameSrc = "your choice"
        Case Else
          sIFrameSrc = "http://www.oxx.no"
      End Select
    End Sub


    You should now be able to set up a working TabStrip on your page. The code I have provided is very simple but these controls can be utilized in many applications.

    More ASP.NET Articles
    More By Himanshu Dhami


     

    ASP.NET ARTICLES

    - How Caching Means More Ca-ching, Part 2
    - How Caching Means More Ca-ching, Part 1
    - Reading a Delimited File Using ASP.Net and V...
    - What is .Net and Where is ASP.NET?
    - An Object Driven Interface with .Net
    - Create Your Own Guestbook In ASP.NET
    - HTTP File Download Without User Interaction ...
    - Dynamically Using Methods in ASP.NET
    - Changing the Page Size Interactively in a Da...
    - XML Serialization in ASP.NET
    - Using Objects in ASP.NET: Part 1/2
    - IE Web Controls in VB.NET
    - Class Frameworks in VB .NET
    - Cryptographic Objects in C#: Part 1
    - Sample Chapter: Pure ASP.Net







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    Stay green...Green IT