C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Implementing menu for tabbed forms


Posted Date: 09 Oct 2008      Total Responses: 1

Posted By: enthusiastic       Member Level: Silver     Points: 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:     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
You must Sign In to post a response.
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   BizTalk Adaptors    Web Design

Help Desk

Contact Us    Privacy Policy    Terms Of Use