Tab Control

M

MWulfe

Can anyone point me to a customizable ASP.Net tab control? I'm not looking
for suites of controls, just this one.

Thanks!
 
N

Nathan Sokalski

Well, I can't really fix that, but I have a feeling that will be the case
with any other tab controls you find online. If having a visual UI for
development is an absolute necessity for you, I would suggest one of the
following two alternatives:

1. Design the tab content outside of the actual control so that you can use
the visual UI just like you would if you weren't even making a tab, and then
once you're done designing the tab content, cut and paste the content into
the the tab.

2. Create a UserControl for each tab, and then all you need to put in the
tab is a single control. Because the content and designing is being done
outside of the tab control, you will be able to use the visual UI just like
you normally would.

I don't think this will be as much of a problem for you as you think, since
once the content for a tab is in it and any css and design properties are
set, most of your work will be done in Source View anyway. Also (and other
developers may have a different opinion on this), when it comes to design
and css, I usually recommend viewing it in a browser (since that way you
know you are seeing what the user will see) and, if one is available (and I
know there is for IE and Firefox), trying any different css using a utility
that allows you to preview different styles directly in the browser. Anyway,
hopefully this helps, good luck!
 
M

MWulfe

I finally decided to build my own, using a menu with tab graphics sitting on
top of a multiview or wizard. The problem I have now is i cannot get rid of
the space between the menu options. The graphics I'm using show the tabs
overlapping, which means each tab is spread across multiple options. The
space between the options ruins that effect. How can I get rid of those
spaces?
 
N

Nathan Sokalski

First of all, is it ok if I ask what specifically you didn't like about the
TabContainer (listed as Tabs) control from the ASP.NET AJAX Control Toolkit
(http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/Tabs/Tabs.aspx)? But
anyway, I enjoy writing code too, so I guess it can be tempting to write
your own, so here are some possible guesses as to the reason for your space
between the menu options (I haven't seen the code, so I can only guess):

1. Check the css, specifically the margin, padding, and border-width
properties.
2. Some browsers are more sensitive to spaces between tags than they should
be (even though html shouldn't be affected by whether or not there is any
space between tags, sometimes it has an effect in some browsers that is hard
to notice, but sometimes makes a difference for precision placement). See if
removing any extra whitespace in your aspx source code makes any difference.

When you say "using a menu", do you mean using the ASP.NET Menu Control, or
do you just mean you created a menu? If you mean the Menu Control, I would
suggest looking at the generated html to see exactly what html you are
playing with. Sometimes during design I find it useful to use a tool that
lets you view and edit the css directly in the browser. IE has the Internet
Explorer Developer Toolkit available, IE8 has the Developer Tools built in,
and I believe Firefox has something called Firebug. I may be able to help
you more if I see some of your code, but I would really like to know
specifically what you didn't like about the one from the ASP.NET AJAX
Control Toolkit (sometimes there is an easy way to get what you want that
you just haven't discovered yet). Good Luck!
 
M

MWulfe

Thanks for your suggestions about removing the space between menu options.
I will try them out. I am using the ASP.Net menu control.

My objection to the AJAX controls is, as I mentioned in my earlier message,
it does not include a UI for development. I will want to put lots of stuff
in each page of the tab control, and will want to arrange them carefully.
If you know of a way to do this please let me know, since this is my first
attempt at using AJAX. So far I am probably one of the 2 or 3 people on the
planet who is not impressed, since everyone else seems to love it.
 
M

MWulfe

I have figured out all the issues I raised about the menu control except for
one: I do not want any text displayed with the menu items. The graphics I
am using already include the necessary text, so unless there is a way to
force the graphic to be behind the text, I need to display the items without
it. I can remove the text from the items, but then they display the values.
I need to use the values in my code, so I cannot do without them, but I do
not want them displayed.

How can I use the menu options with values but without the values being
displayed?
 
N

Nathan Sokalski

I think that the Value property is used as the default Text. It may be a
cheap workaround, but try something like this:

<asp:MenuItem ImageUrl="~/images/frog.gif" Value="45" Text=""/>

Take note that the Text property is set to "". This must be set, if you do
not set the Text property the Value property will be used. Good Luck!
 

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
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top