473,397 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Asp:TreeView

Hi guys

How do I get the new TreeView (asp2.0) to load something in an Iframe? I've
setup a NaviagateUrl and set the Target property to the name of the Iframe,
but it still tries to load a new window?!

Cheers
Dan
Jan 18 '06 #1
3 3254
Hi Dan,

Welcome.
As for the TreeView link's opened place, we just need to specify the target
frame(or iframe)'s "name" in the "Target" property of the TreeViewNode. e.g:

Here is a test page I used on my side which works well, you can have a try
to see whether it also works on your side:

====================

<form id="form1" runat="server">
<div>
<table border="0" cellpadding="0" cellspacing="0" style="width:
100%; height: 100%">
<tr>
<td style="width: 200px" valign="top">
<a href="conPage1.aspx" target="ifContent" >Test
Link...</a>
<asp:TreeView ID="TreeView1" runat="server"
Width="100%" Height="100%">
<Nodes>
<asp:TreeNode Text="Root1" Value="Root1">
<asp:TreeNode
NavigateUrl="http://www.asp.net" Target="ifContent" Text="Sub11"
Value="Sub11">
</asp:TreeNode>
<asp:TreeNode
NavigateUrl="http://www.theserverside.net" Target="ifContent" Text="Sub12"
Value="Sub12"></asp:TreeNode>
</asp:TreeNode>
<asp:TreeNode Text="Root2" Value="Root2">
<asp:TreeNode
NavigateUrl="http://msdn.microsoft.com" Target="_new" Text="Sub21"
Value="Sub21"></asp:TreeNode>
<asp:TreeNode Text="Sub22"
Value="Sub22"></asp:TreeNode>
</asp:TreeNode>
<asp:TreeNode Text="Root3" Value="Root3">
<asp:TreeNode Text="Sub31"
Value="Sub31"></asp:TreeNode>
<asp:TreeNode Text="Sub32"
Value="Sub32"></asp:TreeNode>
</asp:TreeNode>
</Nodes>
</asp:TreeView>
</td>
<td valign="top" width="600" >
<iframe name="ifContent" src="default.aspx" width="100%"
height="500"
scrolling="no"></iframe>
</td>
</tr>
</table>
</div>
</form>
=================

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: TreeView
| thread-index: AcYb/8zY1FZgHeddQTWUG3JZjeDREw==
| X-WBNR-Posting-Host: 172.203.227.195
| From: "=?Utf-8?B?bXVzb3NkZXY=?=" <mu*******@community.nospam>
| Subject: Asp:TreeView
| Date: Tue, 17 Jan 2006 23:21:29 -0800
| Lines: 10
| Message-ID: <9F**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSF TNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:371643
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hi guys
|
| How do I get the new TreeView (asp2.0) to load something in an Iframe?
I've
| setup a NaviagateUrl and set the Target property to the name of the
Iframe,
| but it still tries to load a new window?!
|
| Cheers
|
|
| Dan
|

Jan 18 '06 #2
Hi Steven

Yep thanks, that worked!

Surely using "id" would have been better?! Seems like everything else is
moving toward a solely id model..?

Cheers
Dan

"Steven Cheng[MSFT]" wrote:
Hi Dan,

Welcome.
As for the TreeView link's opened place, we just need to specify the target
frame(or iframe)'s "name" in the "Target" property of the TreeViewNode. e.g:

Here is a test page I used on my side which works well, you can have a try
to see whether it also works on your side:

====================

<form id="form1" runat="server">
<div>
<table border="0" cellpadding="0" cellspacing="0" style="width:
100%; height: 100%">
<tr>
<td style="width: 200px" valign="top">
<a href="conPage1.aspx" target="ifContent" >Test
Link...</a>
<asp:TreeView ID="TreeView1" runat="server"
Width="100%" Height="100%">
<Nodes>
<asp:TreeNode Text="Root1" Value="Root1">
<asp:TreeNode
NavigateUrl="http://www.asp.net" Target="ifContent" Text="Sub11"
Value="Sub11">
</asp:TreeNode>
<asp:TreeNode
NavigateUrl="http://www.theserverside.net" Target="ifContent" Text="Sub12"
Value="Sub12"></asp:TreeNode>
</asp:TreeNode>
<asp:TreeNode Text="Root2" Value="Root2">
<asp:TreeNode
NavigateUrl="http://msdn.microsoft.com" Target="_new" Text="Sub21"
Value="Sub21"></asp:TreeNode>
<asp:TreeNode Text="Sub22"
Value="Sub22"></asp:TreeNode>
</asp:TreeNode>
<asp:TreeNode Text="Root3" Value="Root3">
<asp:TreeNode Text="Sub31"
Value="Sub31"></asp:TreeNode>
<asp:TreeNode Text="Sub32"
Value="Sub32"></asp:TreeNode>
</asp:TreeNode>
</Nodes>
</asp:TreeView>
</td>
<td valign="top" width="600" >
<iframe name="ifContent" src="default.aspx" width="100%"
height="500"
scrolling="no"></iframe>
</td>
</tr>
</table>
</div>
</form>
=================

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: TreeView
| thread-index: AcYb/8zY1FZgHeddQTWUG3JZjeDREw==
| X-WBNR-Posting-Host: 172.203.227.195
| From: "=?Utf-8?B?bXVzb3NkZXY=?=" <mu*******@community.nospam>
| Subject: Asp:TreeView
| Date: Tue, 17 Jan 2006 23:21:29 -0800
| Lines: 10
| Message-ID: <9F**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSF TNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:371643
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hi guys
|
| How do I get the new TreeView (asp2.0) to load something in an Iframe?
I've
| setup a NaviagateUrl and set the Target property to the name of the
Iframe,
| but it still tries to load a new window?!
|
| Cheers
|
|
| Dan
|

Jan 18 '06 #3
Thanks for your response Dan,

We can add "id" attribute or html element, but for the hyperlink's
"Target", it should point to a frame's "name" attribute value...
"Id" is useful when we want to use script code to reference a html element,
e.g:

var txt = document.getElementById("txtInput");

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: Asp:TreeView
| thread-index: AcYcJZj0wDJqHKpwSRapxDa5LvumIw==
| X-WBNR-Posting-Host: 172.203.227.195
| From: "=?Utf-8?B?bXVzb3NkZXY=?=" <mu*******@community.nospam>
| References: <9F**********************************@microsoft.co m>
<ZQ**************@TK2MSFTNGXA02.phx.gbl>
| Subject: RE: Asp:TreeView
| Date: Wed, 18 Jan 2006 03:52:03 -0800
| Lines: 124
| Message-ID: <84**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:371681
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hi Steven
|
| Yep thanks, that worked!
|
| Surely using "id" would have been better?! Seems like everything else is
| moving toward a solely id model..?
|
| Cheers
|
|
| Dan
|
| "Steven Cheng[MSFT]" wrote:
|
| > Hi Dan,
| >
| > Welcome.
| > As for the TreeView link's opened place, we just need to specify the
target
| > frame(or iframe)'s "name" in the "Target" property of the TreeViewNode.
e.g:
| >
| > Here is a test page I used on my side which works well, you can have a
try
| > to see whether it also works on your side:
| >
| > ====================
| >
| > <form id="form1" runat="server">
| > <div>
| > <table border="0" cellpadding="0" cellspacing="0" style="width:
| > 100%; height: 100%">
| > <tr>
| > <td style="width: 200px" valign="top">
| > <a href="conPage1.aspx" target="ifContent" >Test
| > Link...</a>
| > <asp:TreeView ID="TreeView1" runat="server"
| > Width="100%" Height="100%">
| > <Nodes>
| > <asp:TreeNode Text="Root1" Value="Root1">
| > <asp:TreeNode
| > NavigateUrl="http://www.asp.net" Target="ifContent" Text="Sub11"
| > Value="Sub11">
| > </asp:TreeNode>
| > <asp:TreeNode
| > NavigateUrl="http://www.theserverside.net" Target="ifContent"
Text="Sub12"
| > Value="Sub12"></asp:TreeNode>
| > </asp:TreeNode>
| > <asp:TreeNode Text="Root2" Value="Root2">
| > <asp:TreeNode
| > NavigateUrl="http://msdn.microsoft.com" Target="_new" Text="Sub21"
| > Value="Sub21"></asp:TreeNode>
| > <asp:TreeNode Text="Sub22"
| > Value="Sub22"></asp:TreeNode>
| > </asp:TreeNode>
| > <asp:TreeNode Text="Root3" Value="Root3">
| > <asp:TreeNode Text="Sub31"
| > Value="Sub31"></asp:TreeNode>
| > <asp:TreeNode Text="Sub32"
| > Value="Sub32"></asp:TreeNode>
| > </asp:TreeNode>
| > </Nodes>
| > </asp:TreeView>
| > </td>
| > <td valign="top" width="600" >
| > <iframe name="ifContent" src="default.aspx"
width="100%"
| > height="500"
| > scrolling="no"></iframe>
| > </td>
| > </tr>
| > </table>
| >
| >
| > </div>
| > </form>
| > =================
| >
| > Regards,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| > --------------------
| > | Thread-Topic: TreeView
| > | thread-index: AcYb/8zY1FZgHeddQTWUG3JZjeDREw==
| > | X-WBNR-Posting-Host: 172.203.227.195
| > | From: "=?Utf-8?B?bXVzb3NkZXY=?=" <mu*******@community.nospam>
| > | Subject: Asp:TreeView
| > | Date: Tue, 17 Jan 2006 23:21:29 -0800
| > | Lines: 10
| > | Message-ID: <9F**********************************@microsoft.co m>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSF TNGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:371643
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | Hi guys
| > |
| > | How do I get the new TreeView (asp2.0) to load something in an
Iframe?
| > I've
| > | setup a NaviagateUrl and set the Target property to the name of the
| > Iframe,
| > | but it still tries to load a new window?!
| > |
| > | Cheers
| > |
| > |
| > | Dan
| > |
| >
| >
|

Jan 19 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Ed | last post by:
http://aspfaq.com/show.asp?id=2311 Sample: http://aspfaq.com/treeview This works perfectly on Windows IE 6.x and Mac IE. However, in order to be cross-platform compatible, I need to make...
2
by: Srinivasa Raghavan | last post by:
Hi I am using ASP Tree View Control to display data in hiearchy fashion.I am having a checkbox next to the TreeView Node.When user checks or unchecks the nodes and click a button i am putting...
1
by: Srinivasa Raghavan | last post by:
Hi All, I have some doubts on the Treeview control and Form Authentication 1) will Form Authentication work if cookies are disabled. 2) I have problem in the following code (TreeView...
0
by: damiensawyer | last post by:
I have an ASP:Treeview control <asp:TreeView Id="TreeView2" PathSeparator = "|" OnTreeNodePopulate="PopulateNode" ExpandDepth="1" runat="server" cssclass="TreeControl"...
3
by: Daves | last post by:
is there any documentation out there to find out if and then how I can work with TreeView on client side through jscript? For example I want to change title of nodes and remove without doing...
0
by: mazdotnet | last post by:
Hi, I'm using asp:TreeView to display information on our website. I like to add a LinkButton that fires an event when clicked to the TreeNode. TreeNode childNode = new TreeNode("Download...
0
by: rockdale | last post by:
HI, I need to re populate my treeview control based on user's selection. Seems like there is no treeview.clear/ reset method. So I remove the rootnode from my treeview as following TreeNode n...
1
by: GroupReader | last post by:
When doing a "callback" I normally call a webControl's RenderControl method to get the html for that WebControl. This has always worked great in the past, but it does not seem to work with an...
0
by: Zuhaib Hyder | last post by:
how to select asp:TreeView nodes through skin??? (not working) or tell me any other way, through css etc.... selected node not working
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
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,...
0
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...
0
agi2029
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,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.