A Data Driven Tab Strip User Control

Marc Clifton come with an excellent. Using the IE web control tabstrip, he transform the 'ugly' long HTML code to define the tabs as an XML tabstrip.

Just one user control instead in the web page. Excellent !

<uc1:ucTabStrip id=UcTabStrip1 runat="server" TabStrip="Main" />

Introduction

Recently, I've been getting my feet wet with ASP.NET and have been developing several user controls and form binding algorithms all driven by an external XSD/XML file pair.  This article presents one of these controls (the simplest actually), the TabStrip  The tab strip presented here is unmodified from the Internet Explorer WebControls, one of the collection of unsupported ASP.NET server side controls discussed here.  The only thing I've done is made data driven.

Why do this?  Because I realized rather quickly that:

  • I would get rather annoyed with having to define all those tabs every time I wanted a tab strip;
  • I also didn't want to be touching code whenever the tab strip changed during development;
  • writing single solution event handlers for each tab strip, and single solution code in general, is not my style.

 

No Comments