Asp:TreeView

G

Guest

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
 
S

Steven Cheng[MSFT]

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=?=" <[email protected]>
| Subject: Asp:TreeView
| Date: Tue, 17 Jan 2006 23:21:29 -0800
| Lines: 10
| Message-ID: <[email protected]>
| 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!TK2MSFTNGXA03.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
|
 
G

Guest

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
 
S

Steven Cheng[MSFT]

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=?=" <[email protected]>
| References: <[email protected]>
<[email protected]>
| Subject: RE: Asp:TreeView
| Date: Wed, 18 Jan 2006 03:52:03 -0800
| Lines: 124
| Message-ID: <[email protected]>
| 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!TK2MSFTNGXA03.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=?=" <[email protected]>
| > | Subject: Asp:TreeView
| > | Date: Tue, 17 Jan 2006 23:21:29 -0800
| > | Lines: 10
| > | Message-ID: <[email protected]>
| > | 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!TK2MSFTNGXA03.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
| > |
| >
| >
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top