15,891,136 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Rupali sawant (Top 3 by date)
Rupali sawant
29-Dec-11 2:28am
View
Thanks sooooooo much vinodji
problem solved.Your code is Very helpful to me.
God bless you....
U know i spend many days on this problem......
Thanks a lot ...
Thanks,
Rupali
Rupali sawant
27-Dec-11 1:34am
View
Hi Vinod,
Thanks for ur reply
Actually I am ignoring to use Javascript, bcoz Mozilla firefox not supporting to javascript so I trying by using code behind page.
I am creating treeview dynamically and each treenode have the link for different pages.In my page Treeview is on left side & iframe is on right.When click on Treenode link I want to dispaly related page in that iframe.I tried by using "Target" & "NavigateUrl" properties.But linked page open in new window instead of iframe.
My Coding .....
<asp:Content ID="Content1" ContentPlaceHolderID="CPHLeftNav" runat="server">
<asp:Panel ID="pnl_leftNav" runat="server" Visible="false" Style="font: 11px/16px Arial,sans-serif;"
Heigh="100%">
<asp:TreeView ID="TreeView2" runat="server" Style="margin-left: 0px; text-align: left;
margin-left: 0px; padding-left: 0px" Font-Bold="True" ExpandDepth="0" ForeColor="Indigo"
Height="100%" Width="100%" OnSelectedNodeChanged="TreeView2_SelectedNodeChanged"
PopulateNodesFromClient="true" ShowExpandCollapse="true" ImageSet="Arrows"
Target="ifrm1" >
<ParentNodeStyle Font-Bold="true" ForeColor="Firebrick" />
<hovernodestyle font-underline="True" forecolor="#5555DD">
<SelectedNodeStyle Font-Underline="True" ForeColor="#5555DD" HorizontalPadding="0px"
VerticalPadding="0px" />
<nodes>
<asp:TreeNode Text="SomeText" ToolTip="BillEntryForm" Value="SomeText" Target="iframe">
<rootnodestyle forecolor="Firebrick">
<nodestyle forecolor="Black" horizontalpadding="5px" nodespacing="0px" verticalpadding="0px">
<asp:Content ID="Content2" ContentPlaceHolderID="CPHRightContent" runat="server">
<iframe id="ifrm1" runat="server" width="10%" height="10%"></iframe>
Protected Sub TreeView2_SelectedNodeChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TreeView2.SelectedNodeChanged
ifrm1.Attributes.Add("src", TreeView2.SelectedNode.Value.ToString())
End Sub
'''On Loging button click i called the procedure "PopulateRootLevel()"
Private Sub PopulateRootLevel()
''Retriving Data from database
PopulateNodes(dt, TreeView2.Nodes)
End Sub
Private Sub PopulateNodes(ByVal dt As DataTable, _ByVal nodes As TreeNodeCollection)
For Each dr As DataRow In dt.Rows
Dim tn As New TreeNode()
tn.Value = dr("id").ToString()
tn.Text = dr("NText").ToString()
tn.ToolTip = dr("NTooltip").ToString()
tn.Target = ifrm1.ClientID
tn.NavigateUrl = dr("NNavigateUrl").ToString()
'''Some code
nodes.Add(tn)
''''
tn.PopulateOnDemand = (CInt(dr("childnodecount")) > 0)
Next
End Sub
Private Sub PopulateSubLevel(ByVal parentid As Integer, ByVal parentNode As TreeNode)
''' Code for Retrieving Data From database
PopulateNodes(dt, parentNode.ChildNodes)
End Sub
Protected Sub TreeView2_TreeNodePopulate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.TreeNodeEventArgs) Handles TreeView2.TreeNodePopulate
PopulateSubLevel(CInt(e.Node.Value), e.Node)
End Sub
Rupali sawant
10-Dec-11 0:35am
View
Thanks very much for reply...