.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

PdfViewer - Select Pdf from TreeView

Posted By:      Posted Date: October 25, 2010    Points: 0   Category :ASP.Net


Im trying to put together a small document library. I have a treeview (obout.com) that lists all the items in the library. Each can be selected which navigates away from the treeview, opening a pdf. I just added a PdfViewer so that I can view a pdf within a frame on the page. 

I would like to be able to select the pdf from the treeview and have it display to the right in the pdfviewer. It would be really nice if the pdf viewer was in some kind of ajax update panel for the update. I pretty new to all this stuff and have a good idea of how I want it to work, but Im not skilled enough on how to implement it. Could anyone give me some guideance on a good way to get it done.? Any help is well appreciated.


<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="Resources.aspx.cs" Inherits="Library_Filesystem" %>

<%@ Register Assembly="PdfViewer" Namespace="PdfViewer" TagPrefix="cc1" %>
<%@ Import Namespace="obout_ASPTreeView_2_NET" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<asp:Content ID="Content2" ContentPlac

View Complete Post

More Related Resource Links

Treeview: Select all children if Parent is selected etc...



I'm using a Treeview with  ShowCheckBoxes="All" , so basically I have a tree with all CheckBox Nodes. I'm using the TreeView inside an update panel, and populate the Tree code behind dynamically.

My requrements are the following:

1) Select all the children if parent is selected,

2) When parent is selected, and if we de-select a child, set parent unselected

3) Track if new nodes were selected and previously selected nodes were de-selected (becasue I need to update the database according to the selections in the Tree)

For above 1, I do the following:

protected void TreeView1_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e)
        foreach (TreeNode node in TreeView1.Nodes)
            TreeNodeCollection col = node.ChildNodes;
            //select all children when the parent is checked
            if (col != null && node.Checked)

How to multi select items in WPF Treeview using Shift Button


I have a requirement where i have to create a WPF Treeview, bind it to a dataset.
Then i have to provide functionality for user to select nodes either using Ctrl or multi select using Shift button.

I am able to write code to do all the tasks above except multi select using Shift button.
Following is my XAML for Treeview.

<TreeView Name="tvOutput" ItemsSource="{Binding}" Height="200" VerticalAlignment="Top" MouseMove="tvOutput_MouseMove" DragLeave="treeView_DragLeave" SelectedItemChanged="Tree_SelectedItemChanged">
                                <!-- This Style binds a TreeViewItem to a Node. -->
                                <Style TargetType="{x:Type TreeViewItem}">
                                    <Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=TwoWay}" />
                                    <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
                                        <Trigger Property="IsEnabled" Value="True">
                                            <Setter Prop

TreeView - multi select - why so complicated?


I can’t understand why whoever implemented the TreeView implemented it such a way that it is impossible to easily extend to support multi selection (actually, why didn’t they add it to begin with????).


I was looking at how to implement this in my TreeView derived base class and implement it in a way that would not require any style or template changes per tree. I have spend some time looking at the implementation using Reflector, and it seems to me that ‘if only’ the TreeView.ChangeSelection had been exposed as a virtual method instead of internal, then it would have been possible to ‘hack’ it, but unfortunately this is not the case.


So – after a lot of searching I have not been able to find any solution which would require code changes only. Is it possible at all?.

Treeview childnode select


How do i loop through the child & grand nodes of a treeview which is populated via XML?

I can successfully loop through parent nodes but can not child & grand child.What i have to do is loop through all the nodes and select the matched node


knowledge glows

AJAX GridView Checkbox Select All in ASP.Net

In the previous article GridView Select Multiple Rows you learnt the multiple row selection in GridView control. Here you will get the C# code sample to select all the gridview rows using single checkbox server control. You can highlight the selected rows with different color and Font state Bold. If you want to use the selection values on different ASP.Net

Select value in gridview


Hi, I am new to gridview. I want to make a gridview. Its row when selected should direct me to a specific .aspx page.Each row should direct to a different page. Should I use querystrings for this? Please suggest. Regards, ap.

JQuery Treeview plugin is not working with Ajax page load in ie8


Hi there,

I developed a page where i m using jquery treeview plugin to generate tree. It worked fine on FF, IE8 with out ajax.

But when my page loads thro' ajax call in IE8, it is not collapsing or expanding tree.

Any idea?

Thanks in advance.

The XML Files: XSLT Keys, Select vs. Match, Conflict Resolution, and More


This month Aaron Skonnard covers how keys work in XSLT, XSLT match and select attributes, SelectNodes order, finding