Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Asp:TreeView

Reply
Thread Tools

Asp:TreeView

 
 
=?Utf-8?B?bXVzb3NkZXY=?=
Guest
Posts: n/a
 
      01-18-2006
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
 
Reply With Quote
 
 
 
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      01-18-2006
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=?=" <(E-Mail Removed)>
| Subject: Asp:TreeView
| Date: Tue, 17 Jan 2006 23:21:29 -0800
| Lines: 10
| Message-ID: <(E-Mail Removed)>
| 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
|

 
Reply With Quote
 
 
 
 
=?Utf-8?B?bXVzb3NkZXY=?=
Guest
Posts: n/a
 
      01-18-2006
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=?=" <(E-Mail Removed)>
> | Subject: Asp:TreeView
> | Date: Tue, 17 Jan 2006 23:21:29 -0800
> | Lines: 10
> | Message-ID: <(E-Mail Removed)>
> | 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
> |
>
>

 
Reply With Quote
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      01-19-2006
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=?=" <(E-Mail Removed)>
| References: <(E-Mail Removed)>
<(E-Mail Removed)>
| Subject: RE: Asp:TreeView
| Date: Wed, 18 Jan 2006 03:52:03 -0800
| Lines: 124
| Message-ID: <(E-Mail Removed)>
| 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=?=" <(E-Mail Removed)>
| > | Subject: Asp:TreeView
| > | Date: Tue, 17 Jan 2006 23:21:29 -0800
| > | Lines: 10
| > | Message-ID: <(E-Mail Removed)>
| > | 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
| > |
| >
| >
|

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments