Hi frds
i have nested multiviews and used menucontrol to navigate throught views this is my html code -
-
<asp:Menu ID="Menu1" Font-Bold="true" Orientation="Horizontal"
-
StaticEnableDefaultPopOutImage="False"
-
OnMenuItemClick="Menu1_MenuItemClick" runat="server" >
-
<StaticMenuItemStyle CssClass=MenuCell ItemSpacing=0px />
-
<StaticHoverStyle CssClass=MenuCellHover/>
-
<StaticSelectedStyle CssClass=MenuCellSelected ItemSpacing=0px />
-
</asp:Menu>
-
<asp:MultiView ID="mView1" runat="server" ActiveViewIndex="0">
-
<asp:View ID="View1" runat="server">
-
<asp:Label ID="lblView1" runat="server" Text="U r in view1"></asp:Label>
-
</asp:View>
-
<asp:View ID="View2" runat="server">
-
<asp:Label ID="lblView2" runat="Server" Text="U r in View2"></asp:Label>
-
</asp:View>
-
<asp:View ID="View3" runat="server">
-
<asp:Label ID="Label1" runat="Server" Text="U r in View2"></asp:Label>
-
</asp:View>
-
<asp:View ID="View4" runat="server">
-
<table>
-
<tr>
-
<td valign="top">
-
<asp:Menu ID="SubMenu1" runat="Server" Orientation="Vertical"
-
StaticEnableDefaultPopOutImage="false"
-
OnMenuItemClick="SubMenu1_MenuItemClick">
-
<StaticMenuStyle CssClass="MenuCell" />
-
<StaticHoverStyle CssClass=MenuCellHover />
-
<StaticSelectedStyle CssClass=MenuCellSelected />
-
</asp:Menu>
-
</td>
-
-
<td>
-
<table>
-
<tr>
-
<td>
-
<asp:MultiView ID="SubMultiView1" runat="server">
-
<asp:View ID="SubView1" runat="server">
-
<asp:Label ID="lblSubView1" runat="server" Text="u r in submenu"></asp:Label>
-
</asp:View>
-
<asp:View ID="SubView2" runat="server">
-
<asp:Label ID="lblSubView2" runat="server" Text="subview2"></asp:Label>
-
</asp:View>
-
</asp:MultiView>
-
</td>
-
</tr>
-
</table>
-
</td>
-
</tr>
-
</table>
-
-
-
</asp:View>
-
-
</asp:MultiView>
-
in code behind -
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
-
If Not Page.IsPostBack Then
-
Dim index As Integer
-
For index = 0 To mView1.Views.Count - 1
-
Menu1.Items.Add(New MenuItem(mView1.Views(index).ID, index.ToString()))
-
Next index
-
Menu1.Items(0).Selected = True
-
End If
-
End Sub
-
Protected Sub Menu1_MenuItemClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles Menu1.MenuItemClick
-
mView1.ActiveViewIndex = Int32.Parse(e.Item.Value)
-
End Sub
-
I'm able to display the main menu but i'm unable to display submenu which is in view4
can any one giv some idea how to proceed with this
thank u
Archu
2 5869
hi frs i tried n got the solution
here is the code for codebehind -
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
-
If Not Page.IsPostBack Then
-
Dim index As Integer
-
Dim m As MultiView
-
Dim v As View
-
Dim i As Integer
-
For index = 0 To mView1.Views.Count - 1
-
Menu1.Items.Add(New MenuItem(mView1.Views(index).ID, index.ToString()))
-
Next index
-
For Each v In mView1.Views
-
m = DirectCast(v.FindControl("SubMultiView1"), MultiView)
-
If v.Controls.Contains(m) Then
-
'For Each m In v.Controls.Contains(m)
-
For i = 0 To m.Views.Count - 1
-
CType(v.FindControl("SubMenu1"), Menu).Items.Add(New MenuItem(m.Views(i).ID, i.ToString))
-
Next
-
'Next
-
End If
-
Next
-
Menu1.Items(0).Selected = True
-
End If
-
End Sub
-
Protected Sub Menu1_MenuItemClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles Menu1.MenuItemClick
-
mView1.ActiveViewIndex = Int32.Parse(e.Item.Value)
-
End Sub
-
Protected Sub SubMenu1_MenuItemClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles SubMenu1.MenuItemClick
-
'mView1.ActiveViewIndex = Int32.Parse(e.Item.Value)
-
Dim v As View
-
For Each v In mView1.Views
-
CType(v.FindControl("SubMultiView1"), MultiView).ActiveViewIndex = Int32.Parse(e.Item.Value)
-
Next
-
End Sub
-
-
if any modification to do plz let me know
or any other simple way to achieve this
thank u
Archu
Frinavale 9,735
Recognized Expert Moderator Expert
Thanks for sharing the solution Archu!
I'm glad you figured it out!
:) :)
-Frinny
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Michael Hertz |
last post by:
I have hundreds of samples of XML documents on my harddisc. But all of them lack the one or another feature
of XML. Some XML documents have no attributes some others are rather flat (nesting level=2).
Furthermore there are XML samples which do not have duplicate elements with only different attribute values
or all with the same attributes.
I...
|
by: Wolfgang Schwanke |
last post by:
Dear usenet,
I'm having the following small problem.
I've been ask to add some Quicktime panoramas to a website. The author of
the panoramas has made two versions of each: One in MOV format, which needs
a Quicktime plugin, and one Java applet. He's also kindly supplied me with
sample HTML code for each.
The code looks like this...
|
by: CoolPint |
last post by:
I read in books that nested class cannot access private members of
nesting class and vice versa unless they are made friends. Somehow, my
compiler is letting my nested class member functions access private
members of nesting class.
template <typename T>
class Container {
// NO friendship given to any other
public:
class ContainerIterator;
|
by: Stromboli |
last post by:
Hi,
I have my site available in a couple of languages most of the files
are indexf.html (french), indexi.html (italian) and indexde.html
(german)..
I'd like to start using multiviews but I've noticed that search
engines don't index index.html.en but they do index index.en.html.
My question is, how can I configure multiviews to deliver...
|
by: Hardrock |
last post by:
I encountered some difficulty in implementing dynamic loop nesting.
I.e. the number of nesting in a for(...) loop is determined at run
time. For example
void f(int n)
{
For(i=0; i<=K; i++)
For(i=0; i<=K; i++)
| |
by: kl.vanw |
last post by:
I would like to count the nesting level in template classes. How can I
make the following work?
#include <assert.h>
template <class T>
class A {
public:
A() {
// what goes here?
|
by: stephen.cunliffe |
last post by:
Hi,
I'm looking for opinion/facts/arguments on the correct nesting of UL,
OL, & LI elements.
For example, this is what I want (unordered list):
* Item 1
* Item 2
* Item 3
|
by: henry |
last post by:
Folks
Here's a skeleton, generic HTML page, call it "index.php". You'll see a bit
of php code in the middle:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |