Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 23rd, 2007, 02:17 AM
Registered User
 
Join Date: Jun 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default menu item with out post back

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









Similar Threads
Thread Thread Starter Forum Replies Last Post
post back SKhna ASP.NET 2.0 Basics 1 March 10th, 2008 09:23 AM
post back k.manisha ASP.NET 1.0 and 1.1 Professional 2 February 7th, 2007 02:28 PM
how create menubar, menu, menu item in xsl vijayanmsc XSLT 1 June 5th, 2006 06:43 AM
Post Back rngrmn Pro VB.NET 2002/2003 1 May 5th, 2006 11:21 AM
Menu Help in statusbar at mousemove over Menu item Kaustav VB Components 1 September 14th, 2005 09:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.