Open pdf file in the main frame over a TreeView Control

Discussion in 'ASP .Net Web Controls' started by Michael Ahrens, Aug 18, 2008.

  1. 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
    Michael Ahrens, Aug 18, 2008
    #1
    1. Advertising

  2. 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:
    .

    ==================================================
    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" <>
    >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
    >
    >
    Steven Cheng [MSFT], Aug 19, 2008
    #2
    1. Advertising

  3. Hi Steven

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

    Regards
    Mike

    "Steven Cheng [MSFT]" <> wrote in message
    news:...
    > 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:
    > .
    >
    > ==================================================
    > 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" <>
    >>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
    >>
    >>

    >
    Michael Ahrens, Aug 19, 2008
    #3
  4. 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:
    .

    --------------------
    >From: "Michael Ahrens" <>
    >References: <>

    <>
    >In-Reply-To: <>
    >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 [MSFT]" <> wrote in message
    >news:...
    >> 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:
    >> .
    >>
    >> ==================================================
    >> 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" <>
    >>>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
    >>>
    >>>

    >>

    >
    >
    Steven Cheng [MSFT], Aug 20, 2008
    #4
  5. what was the answer?

    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:

    On Monday, August 18, 2008 7:42 AM
    Michael Ahrens wrote:

    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

    On Tuesday, August 19, 2008 7:38 AM
    Michael Ahrens wrote:

    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

    On Tuesday, August 19, 2008 10:29 PM
    stchen wrote:

    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:
    .

    --------------------
    <>

    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
    Richard Holloway, Nov 18, 2009
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Carl Prothman [MVP]

    Re: Open linked PDF-Files from a PDF-File

    Carl Prothman [MVP], Aug 9, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    456
    Paul Kuebler
    Aug 12, 2003
  2. Paul Kuebler

    Open linked PDF-Files from a PDF-File

    Paul Kuebler, Aug 12, 2003, in forum: ASP .Net
    Replies:
    8
    Views:
    449
    Carl Prothman [MVP]
    Aug 18, 2003
  3. Søren M. Olesen
    Replies:
    0
    Views:
    566
    Søren M. Olesen
    Nov 13, 2003
  4. Ricardo Pog
    Replies:
    1
    Views:
    401
    Austin Ziegler
    Mar 26, 2008
  5. Sean Nakasone
    Replies:
    1
    Views:
    344
    Farrel Lifson
    Apr 14, 2008
Loading...

Share This Page