C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » ASP.NET »

Implementing menu for tabbed forms


Posted Date: 09 Oct 2008      Posted By: enthusiastic      Member Level: Silver     Points: 1   Responses: 1



Hi All,

I an working on a website and I am trying to implement a tabbed form in ASP .NET.

I did like following in .aspx page:

<asp:menu id="Menu1" width="165px" runat="server" orientation="Horizontal" staticenabledefaultpopoutimage="False" onmenuitemclick="Menu1_MenuItemClick">

<asp:menuitem text="" value="0">
<asp:menuitem text="" value="1">

<asp:multiview id="MultiView1" runat="server" activeviewindex="0">
<asp:view id="Tab1" runat="server">

Contents of the Sub form

<asp:button id="cmdAdda" runat="server" text="Add the Record" tabindex="13" />
<asp:view id="Tab2" runat="server">
Contents of the subform
<asp:button id="cmdAddb" runat="server" text="Add the Record" />

And the code in vb .net is:

Protected Sub Menu1_MenuItemClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles Menu1.MenuItemClick
Dim i As Integer
MultiView1.ActiveViewIndex = Int32.Parse(e.Item.Value)
i = e.Item.Value
Label2.Visible = False
If (i = "0") Then
Me.Menu1.Items(0).ImageUrl = "~/selectedtab_app.gif"
Me.Menu1.Items(1).ImageUrl = "~/unselectedtab_tut.gif"
ElseIf (i = "1") Then
Me.Menu1.Items(0).ImageUrl = "~/unselectedtab_app.gif"
Me.Menu1.Items(1).ImageUrl = "~/selectedtab_tut.gif"

End If

End Sub



The problem is that when I click on the second tab, it is not getting clicked ( the value of i is not being 1 so that the next sub-form is not getting shown).

I am highly seeking for help.

Thanks,





Responses

Author: Shankar Suresh    10 Oct 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 4

hi....

you can use ajax tab controls......
in vb separate tab control is there .........but web application not having tab control.....thats what you can download ajax control tool kits and try to tab controls menu.....

http://www.asp.net/AJAX/downloads/



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : Interview Question-What is Active Directory?
Previous : Extract Text from Word Document
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use