Tabbed control for ASP.NET pages

J

jonefer

I'm a total Dotnet beginner, is there any example for creating the same kind
of Tabbed control for Windows Forms - such as in Yahoo mail?
 
K

Keith Patrick

Look for samples of the Repeater and MultiView controls in MSDN. The
repeater can be used to build your tabs, and the multiview can be used as
your tab pages with the same effect.
 
J

jonefer

Thank you. I looked through MSDN, but can't find MultiView.
Would you mind describing for me how you would do this with the repeater
control (I don't expect a totally coded example, I just need more
familiarization with this tool)- I've always pictured this tool as an
alternative to a data grid - kind of like a "continuous form view" in MS
Access when viewing multiple records.

I have a simple member search app that I made in MS Access and I want to
convert it to a browser app. - It seems fairly simple because I'm only
searching on 3 fields in a basically flat table.
 
A

agapeton

Here's a multiview...

<asp:MultiView id="mvMyPage" runat="server" ActiveViewIndex="0">
<asp:View id="vSelection" runat="server">
</asp:View>
<asp:View id="vData" runat="server">
</asp:View>
</asp:MultiView>

Your codebehind works like this...
mvMyPage.SetActiveView(vData);

It's really simple...

Avoid the Wizard control at ANY cost...it does nothing but put tables
in your code. Tables are evil for layouts. The MultiView provides a
very clean, very manageable, and very customizable way to have more
than one "page" in a page in parallel.

That said...sounds like you want to check out the FormsView. I've
hated all versions of Visual Studio from 4.0 till today...except VS2005
is AWESOME. Let intellisense help you with the FormsView. You can
also let intellisense help you with the coding against the MultiView,
but there's not much more to it than what I just showed you.

MSDN is loaded with this stuff. I don't mean the sometimes incomplete
MSDN library, but the articles and columns.
 
K

Keith Patrick

Another thing instead of the Repeater is a variation of the TreeView. The
reason this is such a good control for a tab-based application is that it
can show a single level of a SiteMap (my favorite feature of ASP.Net 2.0,
BTW), styled as "tab buttons". If you organize your sitemap in terms of of
functional layers, your tabs (treeview with its datasource's databinding
level set to 1 with no root) can use the sitemap as its datasource, and you
can feed the sitemap's subtrees to a single control that reads
hierarchicaldatasource's rather than use MultiView and have a more scaleable
application in terms of being maintenance-free when adding content to the
sitemap.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,141
Messages
2,570,813
Members
47,357
Latest member
sitele8746

Latest Threads

Top