Open pdf file in the main frame over a TreeView Control

M

Michael Ahrens

Hi all

I have a frameset with two frames. One is navigation (TreeView 2.0) and the
second is the main frame.
How can I use a TreeView Control to open pdf's in my main frame. I already
used the navigateurl and the target properties. but nothing happens. no pdf
is opened. If I enter an url like www.live.com it works without a problem.
do i have to enable something?

that works
TreeView1.Nodes[0].Target = "main";
TreeView1.Nodes[0].NavigateUrl = "http://www.live.com";

that doesn't work
TreeView1.Nodes[0].Target = "main";
TreeView1.Nodes[0].NavigateUrl = "C:\\Users\\testAccount\\Desktop\\t.pdf";

thanks for your help
mike
 
S

Steven Cheng [MSFT]

Hi Mike,

From your description, you're trying to use TreeView control to open some
PDF file via hyperlink settings, however it doesn't work, correct?

According to the code snippet you provided, you're using the TreeView Node
to link some local file (such as c:\....\xxx.pdf) on client user's
computer. I think this is the problem here, IEor some o ther browser
doesn't allow the web page to load or link local files on user's client
machine. This is due to security consideration, because if we allow such
operation, it may open a big security hole which can let server-side script
load discretionary files on client computer.

If the PDF files are on server-side, you can use a server http based url to
reference them. For client-side files, if you do need to load them, I
suggest you consider use some activeX control to do such things.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
From: "Michael Ahrens" <[email protected]>
Subject: Open pdf file in the main frame over a TreeView Control
Date: Mon, 18 Aug 2008 13:42:56 +0200
Hi all

I have a frameset with two frames. One is navigation (TreeView 2.0) and the
second is the main frame.
How can I use a TreeView Control to open pdf's in my main frame. I already
used the navigateurl and the target properties. but nothing happens. no pdf
is opened. If I enter an url like www.live.com it works without a problem.
do i have to enable something?

that works
TreeView1.Nodes[0].Target = "main";
TreeView1.Nodes[0].NavigateUrl = "http://www.live.com";

that doesn't work
TreeView1.Nodes[0].Target = "main";
TreeView1.Nodes[0].NavigateUrl = "C:\\Users\\testAccount\\Desktop\\t.pdf";

thanks for your help
mike
 
M

Michael Ahrens

Hi Steven

Thanks for your help! that was exactly what i needed!

Regards
Mike

Steven Cheng said:
Hi Mike,

From your description, you're trying to use TreeView control to open some
PDF file via hyperlink settings, however it doesn't work, correct?

According to the code snippet you provided, you're using the TreeView Node
to link some local file (such as c:\....\xxx.pdf) on client user's
computer. I think this is the problem here, IEor some o ther browser
doesn't allow the web page to load or link local files on user's client
machine. This is due to security consideration, because if we allow such
operation, it may open a big security hole which can let server-side
script
load discretionary files on client computer.

If the PDF files are on server-side, you can use a server http based url
to
reference them. For client-side files, if you do need to load them, I
suggest you consider use some activeX control to do such things.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.


--------------------
From: "Michael Ahrens" <[email protected]>
Subject: Open pdf file in the main frame over a TreeView Control
Date: Mon, 18 Aug 2008 13:42:56 +0200
Hi all

I have a frameset with two frames. One is navigation (TreeView 2.0) and the
second is the main frame.
How can I use a TreeView Control to open pdf's in my main frame. I already
used the navigateurl and the target properties. but nothing happens. no pdf
is opened. If I enter an url like www.live.com it works without a problem.
do i have to enable something?

that works
TreeView1.Nodes[0].Target = "main";
TreeView1.Nodes[0].NavigateUrl = "http://www.live.com";

that doesn't work
TreeView1.Nodes[0].Target = "main";
TreeView1.Nodes[0].NavigateUrl = "C:\\Users\\testAccount\\Desktop\\t.pdf";

thanks for your help
mike
 
S

Steven Cheng [MSFT]

You're welcome Michael,

If you have any further questions later, please feel free to post here.

Have a good day!

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

--------------------
From: "Michael Ahrens" <[email protected]>
References: <[email protected]>
In-Reply-To: <[email protected]>
Subject: Re: Open pdf file in the main frame over a TreeView Control
Date: Tue, 19 Aug 2008 13:38:53 +0200
Hi Steven

Thanks for your help! that was exactly what i needed!

Regards
Mike

Steven Cheng said:
Hi Mike,

From your description, you're trying to use TreeView control to open some
PDF file via hyperlink settings, however it doesn't work, correct?

According to the code snippet you provided, you're using the TreeView Node
to link some local file (such as c:\....\xxx.pdf) on client user's
computer. I think this is the problem here, IEor some o ther browser
doesn't allow the web page to load or link local files on user's client
machine. This is due to security consideration, because if we allow such
operation, it may open a big security hole which can let server-side
script
load discretionary files on client computer.

If the PDF files are on server-side, you can use a server http based url
to
reference them. For client-side files, if you do need to load them, I
suggest you consider use some activeX control to do such things.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.


--------------------
From: "Michael Ahrens" <[email protected]>
Subject: Open pdf file in the main frame over a TreeView Control
Date: Mon, 18 Aug 2008 13:42:56 +0200
Hi all

I have a frameset with two frames. One is navigation (TreeView 2.0) and the
second is the main frame.
How can I use a TreeView Control to open pdf's in my main frame. I already
used the navigateurl and the target properties. but nothing happens. no pdf
is opened. If I enter an url like www.live.com it works without a problem.
do i have to enable something?

that works
TreeView1.Nodes[0].Target = "main";
TreeView1.Nodes[0].NavigateUrl = "http://www.live.com";

that doesn't work
TreeView1.Nodes[0].Target = "main";
TreeView1.Nodes[0].NavigateUrl = "C:\\Users\\testAccount\\Desktop\\t.pdf";

thanks for your help
mike
 
R

Richard Holloway

I don't see the answer.



Michael Ahrens wrote:

Hi StevenThanks for your help! that was exactly what i needed!
19-Aug-08

Hi Steven

Thanks for your help! that was exactly what i needed!

Regards
Mike

Previous Posts In This Thread:

Open pdf file in the main frame over a TreeView Control
Hi all

I have a frameset with two frames. One is navigation (TreeView 2.0) and the
second is the main frame.
How can I use a TreeView Control to open pdf's in my main frame. I already
used the navigateurl and the target properties. but nothing happens. no pdf
is opened. If I enter an url like www.live.com it works without a problem.
do i have to enable something?

that works
TreeView1.Nodes[0].Target = "main";
TreeView1.Nodes[0].NavigateUrl = "http://www.live.com";

that doesn't work
TreeView1.Nodes[0].Target = "main";
TreeView1.Nodes[0].NavigateUrl = "C:\\Users\\testAccount\\Desktop\\t.pdf";

thanks for your help
mike

Hi StevenThanks for your help! that was exactly what i needed!
Hi Steven

Thanks for your help! that was exactly what i needed!

Regards
Mike

You're welcome Michael,If you have any further questions later, please feel
You're welcome Michael,

If you have any further questions later, please feel free to post here.

Have a good day!

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

--------------------
<[email protected]>

Node
Please
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
issues
follow
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
already
problem.
"C:\\Users\\testAccount\\Desktop\\t.pdf";

EggHeadCafe - Software Developer Portal of Choice
build a Google Translation Service Web Scraper
http://www.eggheadcafe.com/tutorial...2-247547d77375/build-a-google-translatio.aspx
 

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

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top