CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 3/30/2008 4:51:25 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 38 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
mariolopes
Asp.Net User
Masterpage, treeview and Multiview3/30/2008 4:51:25 PM

0/0

Hi There

I have a masterpage with a treeview control. I have three options in my treeview menu. All the options open the file inserir.aspx (this page as a multiview control). If i choose option 1 i need to activate the view1 in multiview control, if I choose the option2 i need to activate the view 2 and so on.
Can someone tell me how can i achive this?
Thank you


Mario Lopes
anas
Asp.Net User
Re: Masterpage, treeview and Multiview3/30/2008 5:59:35 PM

0/0

you can use the QueryString to pass the ViewIndex from the TreeView :

this is a working example :

in master page :

this is the treeView:

 

<asp:TreeView ID="jhhhj" runat="server">
    <Nodes>
        <asp:TreeNode NavigateUrl="inserir.aspx?view=1" Text="First View"></asp:TreeNode>
        <asp:TreeNode NavigateUrl="inserir.aspx?view=2" Text="Second View"></asp:TreeNode>
        <asp:TreeNode NavigateUrl="inserir.aspx?view=3" Text="third View" ></asp:TreeNode>
    </Nodes>
</asp:TreeView>

declare the MutiView in  inserir.aspx :

 

   <asp:MultiView ID="MultiView1" runat="server">
        <asp:View ID="View1" runat="server">
            FirstView
        </asp:View>
        <asp:View ID="View2" runat="server">
            Second View</asp:View>
        <asp:View ID="View3" runat="server">
            Third View</asp:View>
    </asp:MultiView>

 and in inserir.aspx page_Load  , get the Passed Query string as follows:

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        If Request.QueryString("view") IsNot Nothing Then
            Dim ViewIndexs As Integer = Integer.Parse(Request.QueryString("view"))

            ' need to subtract -1 because its strt from zero 
            Me.MultiView1.ActiveViewIndex = ViewIndexs - 1

        End If

    End Sub

 

Regards,


Anas Ghanem | My Blog | Online VB - C# Converter | Aljazeera
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Learning ASP.NET 3.5 Authors: Jesse Liberty, Dan Hurwitz, Brian MacDonald, Pages: 576, Published: 2008
Pro ASP.NET 2.0 in C# 2005 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1255, Published: 2005
Pro ASP.NET 2.0 in VB 2005: From Professional to Expert Authors: Laurence Moroney, Matthew MacDonald, Pages: 1253, Published: 2006
Pro ASP.NET 3.5 in C# 2008 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1498, Published: 2007
Pro ASP.NET 2.0 in C# 2005: Create Next-generation Web Applications with the Latest Version of Microsoft's Revolutionary Technology Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1426, Published: 2006
Beginning ASP.NET 2.0 Databases: From Novice to Professional Authors: Damien Foggon, Pages: 625, Published: 2006
ASP.NET 2.0: A Developer's Notebook Authors: Wei Meng Lee, Pages: 326, Published: 2005
Buku Latihan Authors: Ario Suryo Kusumo, Pages: 0, Published: -1
Essential ASP.Net 2.0 Authors: Fritz Onion, Keith Brown, Pages: 345, Published: 2006
Beginning ASP.NET 3.5 in VB 9.0: From Novice to Professional Authors: Matthew MacDonald, Pages: 1149, Published: 2007

Web:
Masterpage, treeview and Multiview - ASP.NET Forums I have a masterpage with a treeview control. I have three options in my treeview menu. All the options open the file inserir.aspx (this page as a multiview ...
UpdatePanel with Menu and MasterPages - ASP.NET Forums And I extensively use Menu controls to create tabstrips in combination with a MultiView control. I hope Menu and Treeview support can still ...
MultiView Contrtol will not work in content page if master page ... MultiView Contrtol will not work in content page if master page has ... I have a Master Page that has a TreeView for navigation via the Web.sitemap file. ...
Possible to cache MasterPage on the client? had it working in a version that used a MultiView instead of a true MasterPage layout, but it wasn't conducive to the SiteMap that I use ...
Edgewaters: MasterPage tips MasterPage tips. It pays to look around at what other developers are doing. ... Conditionally Setting Font Color In A WPF TreeView. ...
Managing Look, Feel, and Layout with Visual Studio 2005 and ASP ... Menu, TreeView, and SiteMapPath. Web Parts controls. WebPartManager, WebPartZone , etc. UI controls. FileUpload, BulletedList, MultiView, Wizard, etc. ...
web user control with a multiview urgent help If I remove the multiview control and the property that sets the active view ... NET 2.0 Treeview Controls' State within a Master Page ...
ng.asp-net-forum.master_pages_themes_and_navigation_controls - fix ... Masterpage with treeview sitemap and contentpanel, 2, 33, 4/14/2008 7:04:38 AM ... MultiView, Multiple DetailsView and error "Failed to load viewstate. ...
Master Page prevents using style sheets? that was contained in the master page. So my questions are: ..... Multiview + Infragistics maskinput controls + ...
TheMSsForum.com >> Asp >> How To: Set Label Text Property In ... Tag: How To: Set Label Text Property In Master Page (From Subscribing Page)? Tag : 474995. 18 ยท Bug in Multiview?! Hi all, Maybe I am being stupid or this is ...




Search This Site:










why has "an error has occurred."?

using http alias to go "live" on portal

dotnetnuke

shared ssl and forms login

bug? trying to rename a label id which is contained in a masterpage file gives a 'the directory name is invalid' error

private photo viewing on godaddy.com

customize the passwordretrieval control

tree view

vs 2005

help with .text - application error!

calling all thai dnn'ers

having a static post on top

inheritance strategy - contentlistpage->booksection->one step further

portal copy

where did page.header.linkedstylesheets go to??

login failed for user 'servername\aspnet'.

master page returns null

where is the sql database stored?

problem when i attempt to open my web application in vs2005

survey missing

sitemap vs xmldatasource: staticselectedstyle not applied - help

changing masterpage label from masterpage code behind

'gettabbyname' doesn't exist - dnn 3.2.2

page level security

who's on line?

background color problem in mobile controls

discussion module "reply" link

how to apply the style sheet to the content page?

link back to top of page?

error; while personalizing the page "the specified display mode is not supported on this page"

 
All Times Are GMT