Last post Feb 09, 2009 03:19 PM by XIII
Feb 09, 2009 02:40 PM|Svevarn|LINK
<ul class="tabmenu" runat="server">
<li><a href="">Link 1</a></li>
<li><a href="">Link 2</a></li>
<li><a href="">Link 3</a></li>
<div id="div1" runat="server">Div1</div>
<div id="div2" runat="server">Div2</div>
<div id="div3" runat="server">Div3</div>
Been trying to google, but only find stuff with <table> tags and/or with ajax stuff that I dont need.
Thanks in advance.
Feb 09, 2009 02:50 PM|Evan Freeman|LINK
Just use styles. You can set a style on both client side and on server side. Though I don't think I understand why you would want to do a postback on a menu click if you are just hiding and showing div's
Feb 09, 2009 02:52 PM|XIII|LINK
either you make the links linkbuttons and upon every postback you decide in the Click logic (you can reuse the Click eventhandler for all linkbuttons and grab the sender as to know which linkbutton caused the postback) to decide which panel should be made
visible. However this causes every time a postback which you probably don't want.
Another way is to use the Accordion control:
Feb 09, 2009 03:00 PM|Svevarn|LINK
Reason for that is that in those divs I have controls and if they are selected, calendar-control for example. Page reloads, and first div shows again and rest is hidden, if I use "standard" clientside "toggling".
Feb 09, 2009 03:04 PM|Evan Freeman|LINK
That could actually be worked around by using a hidden field and setting its value to teh selected tab/lin.whatever and on page load setting the selected one == hidden field value.
Feb 09, 2009 03:19 PM|XIII|LINK
and on page load setting the selected one == hidden field value.
As I explained in my previous reply. The accordion control however offers already the possibility to remain the opened pane upon postback so it would require the least amount of work.