Hello EveryOne !
I am using Asp.net (visual studio 2005) iam using menu control as a tabs and multiview control to display the tab information the code is below:
----------------
in html page--------------
<asp:Menu ID="Menu1" Width="168px" runat="server" Orientation="Horizontal" StaticEnableDefaultPopOutImage="False" OnMenuItemClick="Menu1_MenuItemClick" ItemWrap="True">
<Items>
<asp:MenuItem ImageUrl="~/selectedtab.GIF" Text=" " Value="0"></asp:MenuItem>
<asp:MenuItem ImageUrl="~/unselectedtab.GIF" Text=" " Value="1"></asp:MenuItem>
</Items>
</asp:Menu>
--------------------
<asp:MultiView
ID="MultiView1"
runat="server"
ActiveViewIndex="0" >
<asp:View ID="Tab1" runat="server" >
<table width="600" cellpadding="0" cellspacing="0">
<tr valign="top">
<td class="TabArea" style="width: 600px">
<br />
<br />
TAB VIEW 1
INSERT YOUR CONENT IN HERE
CHANGE SELECTED IMAGE URL AS NECESSARY
</td>
</tr>
</table>
</asp:View>
<asp:View ID="Tab2" runat="server">
<table width="600" cellpadding="0" cellspacing="0">
<tr valign="top">
<td class="TabArea" style="width: 600px">
<br />
<br />
TAB VIEW 2
INSERT YOUR CONENT IN HERE
CHANGE SELECTED IMAGE URL AS NECESSARY
</td>
</tr>
</table>
</asp:View>
</asp:MultiView>
-----------------------------------
------------
on vb page one function i have used
Protected Sub Menu1_MenuItemClick(ByVal sender As Object, ByVal e As MenuEventArgs) Handles Menu1.MenuItemClick
MultiView1.ActiveViewIndex = Int32.Parse(e.Item.Value)
Dim i As Integer
'Make the selected menu item reflect the correct imageurl
For i = 0 To Menu1.Items.Count - 1
If i = e.Item.Value Then
Menu1.Items(i).ImageUrl = "selectedtab.gif"
Else
Menu1.Items(i).ImageUrl = "unselectedtab.gif"
End If
Next
End Sub
-----------------------------
end of the code
The above mentioned code works fine on tab selection
But the problem is : on click on tab, page is getting post back which i dont required.
if any one can help me to click on the tab with out post back will be very thankful
Thanks