Opening file present in treeview by clicking on it within a table? I had created a table with a row and two columns. in one column i had dislayed treeview and want that if i click on the file in treeview it gets opened in other column. Can this happen?
I also got a code in some website related to my problem but there are errors in this code that i am not able to understand can you correct those errors:
using System;
using System.IO;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using Microsoft.Web.UI.WebControls;
namespace shark.TreeView
/// <summary>
/// Summary description for DocTree.
/// </summary>
public class DocTree : System.Web.UI.Page
protected Microsoft.Web.UI.WebControls.TreeView TreeCtrl;
public DocTree()
Page.Init += new System.EventHandler(Page_Init);
private void Page_Load(object sender, System.EventArgs e)
if ( ! this.IsPostBack )
// add tree node "type" for folders and files
string imgurl = "/shark/webctrl_client/1_0/Images/";
TreeNodeType type;
type = new TreeNodeType();
type.Type = "folder";
type.ImageUrl = imgurl + "folder.gif";
type.ExpandedImageUrl = imgurl + "folderopen.gif";
TreeCtrl.TreeNodeTypes.Add( type );
type = new TreeNodeType();
type.Type = "file";
type.ImageUrl = imgurl + "html.gif";
TreeCtrl.TreeNodeTypes.Add( type );
// start the recursively load from our application root path
// (we add the trailing "/" for a little substring trimming below)
GetFolders( MapPath( "~/./" ), TreeCtrl.Nodes );
// expand 3 levels of the tree
TreeCtrl.ExpandLevel = 3;
private void Page_Init(object sender, EventArgs e)
InitializeComponent();
// recursive method to load all folders and files into tree
private void GetFolders( string path, TreeNodeCollection nodes )
// add nodes for all directories (folders)
string[] dirs = Directory.GetDirectories( path );
foreach( string p in dirs )
string dp = p.Substring( path.Length );
if ( dp.StartsWith( "_v" ) )
continue; // ignore frontpage (Vermeer Technology) folders
nodes.Add( Node( "", p.Substring( path.Length ), "folder" ) );
// add nodes for all files in this directory (folder)
string[] files = Directory.GetFiles( path, "*.aspx" );
foreach( string p in files )
nodes.Add( Node( p, p.Substring( path.Length ), "file" ) );
// add all subdirectories for each directory (recursive)
for( int i = 0; i < nodes.Count; i++ )
if ( nodes[ i ].Type == "folder" )
GetFolders( dirs[ i ] + "\\", nodes[i ].Nodes );
// create a TreeNode from the specified path, text and type
private TreeNode Node( string path, string text, string type )
TreeNode n = new TreeNode();
n.Type = type;
n.Text = text;
if ( type == "file" )
// strip off the physical application root portion of path
string nav = "/" + path.Substring( MapPath( "/" ).Length );
nav.Replace( '\\', '/' );
n.NavigateUrl = nav;
// set target if using FRAME/IFRAME
n.Target="doc";
return n;
#region Web Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
this.Load += new System.EventHandler(this.Page_Load);
#endregion
and the design that i got on website for the code that i displayed just above it is
<%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %>
<%@ Page language="c#" Codebehind="DocTree.aspx.cs" AutoEventWireup="false" Inherits="shark.TreeView.DocTree" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript (ECMAScript)" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
</HEAD>
<body>
<form id="DocTree" method="post" runat="server">
<table height="100%" cellSpacing="0" cellPadding="8" border="0">
<tr height="100%">
<td vAlign="top">
<iewc:treeview id="TreeCtrl" runat="server" SystemImagesPath="/shark/webctrl_client/1_0/treeimages/">
</iewc:treeview>
</td>
<td vAlign="top" width="100%" height="100%">
Click on any *.aspx page in the tree and it should load here <iframe id="doc" name="doc" frameBorder="yes" width="100%" scrolling="auto" height="100%">
</iframe>
</td>
</tr>
</table>
</form>
</body>
</HTML>
This is my code for viewing treeview but it is not expanding plz help me in this also
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.IO;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;
using System.Media;
using System.Drawing;
using System.Drawing.Imaging;
public partial class _Default : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
if (Page.IsPostBack == false)
System.IO.DirectoryInfo RootDir = new System.IO.DirectoryInfo(Server.MapPath("~/Files"));
// output the directory into a node
TreeNode RootNode = OutputDirectory(RootDir, null);
// add the output to the tree
MyTree.Nodes.Add(RootNode);
TreeNode OutputDirectory(System.IO.DirectoryInfo directory, TreeNode parentNode)
// validate param
if (directory == null) return null;
// create a node for this directory
TreeNode DirNode = new TreeNode(directory.Name);
// get subdirectories of the current directory
System.IO.DirectoryInfo[] SubDirectories = directory.GetDirectories();
// OutputDirectory(SubDirectories[0], "Directories");
// output each subdirectory
for (int DirectoryCount = 0; DirectoryCount < SubDirectories.Length; DirectoryCount++)
OutputDirectory(SubDirectories[DirectoryCount], DirNode);
// output the current directories file
System.IO.FileInfo[] Files = directory.GetFiles();
for (int FileCount = 0; FileCount < Files.Length; FileCount++)
DirNode.ChildNodes.Add(new TreeNode(Files[FileCount].Name));
} // if the parent node is null, return this node
// otherwise add this node to the parent and return the parent
if (parentNode == null)
return DirNode;
else
parentNode.ChildNodes.Add(DirNode);
return parentNode;
This is my design
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.auto-style2
width: 412px;
.auto-style3
width: 174px;
.auto-style4
width: 743px;
.auto-style5
width: 506px;
height: 226px;
</style>
</head>
<body>
<form id="form1" method="post" runat="server">
<table align:"center" class="auto-style4" border="1" style="table-layout: fixed; border-spacing: 1px">
<tr>
<td class="auto-style3">
<br />
<br />
<br />
<br />
</td>
<td class="auto-style2">
<br />
<br />
<br />
<br />
</td>
</tr>
<tr>
<td class="auto-style3" valign="top">
<asp:TreeView Id="MyTree" PathSeparator = "|" ExpandDepth="0" runat="server" ImageSet="Arrows" AutoGenerateDataBindings="False">
<SelectedNodeStyle Font-Underline="True" HorizontalPadding="0px" VerticalPadding="0px" ForeColor="#5555DD"></SelectedNodeStyle>
<NodeStyle VerticalPadding="0px" Font-Names="Tahoma" Font-Size="10pt" HorizontalPadding="5px" ForeColor="#000000" NodeSpacing="0px"></NodeStyle>
<ParentNodeStyle Font-Bold="False" />
<HoverNodeStyle Font-Underline="True" ForeColor="#5555DD"></HoverNodeStyle>
</asp:TreeView>
</td>
<td class="auto-style2">
<base target="_blank" /> <iframe frameborder="0" scrolling="yes" marginheight="0" marginwidth="0"
src="" class="auto-style5"></iframe>
</td>
</tr>
</table>
</form>
</body>
</html>
Hi meghage,
From your code, it is a WebForm project.
This forum is to discuss problems of Windows Forms. Your question is not related to the topic of this forum.
You can consider posting it in asp.net forum for supports . Thanks.
ASP.NET: http://forums.asp.net
Regards,
Youjun Tang
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Similar Messages
-
In Illustrator, I have a saved artwork, then I'm saving a copy as PDF, as usual.
After I keep the AI file open, making some modifications which I don't want to save, so I close the file and click "Don't Save".
Even though I clicked that, the file's modification time is changing.
(The modifications I made are not there, so it's not really saving but why the date is changing then?)
Please find the cause of it! Thank you!All I can suggest is that you open that file on the MBA and save it as a new file, then see if you can open the new one on the iMac.
-
I asked if AVCHD files can be played on Mac and the support site says to simply click on the icon and quick time will play it. A big lie. Just say it won't support the file type and tell us what apps to get. anybody?
I also had issues opening AVCHD files on case-sensitive filesystems.
You can try these steps to solve the issue:
Right click on the AVCHD file and select 'Show Package Contents'
Right click on the BDMV file and select 'Show Package Contents'
Rename index.bdm to INDEX.BDM (it seems that all files in the BDMV folder should be in UPPERCASE for Quicktime to open the AVCHD file).
Go back twice and try again to double-click on the AVCHD file (Quicktime should open a window showing the multiple clips, as expected). -
The circuit of my macbook is dead yet the hard drive is fine. I need to access a file from the hard drive, how can i do this? The mac turns on the screen freezes as bright blue. Is there a cable i can connect to another mac that will let me transfer the file?
There is another option if the Macbook will start up in Target Disk Mode.
Restart the computer while holding down the T key. If you see the firewire symbol moving around on the screen you can connect this one to another one in TDM. You will need a suitable cable to connect the two Macs.
http://support.apple.com/kb/ht1661
Firewire symbol: -
I have an old file with an .A4P video from 1999. I don't own any Adobe products (and don't really want to buy any). I just want to be able to convert the file to something that I can actually view. Any help?
I was a kid when I made a documentary for a school project. I've been trying to figure out how to retrieve the file. 4 years ago, I was able to get the files off the Iomega Zip drive (finally), but I now see the file is saved as a .A4P. There is also a file saved as a .PKG as well, but I don't know how to open this with my Windows 8 COmputer..a4p is an Authorware v.4 (Windows) project.
Interesting you have it as a .pkg...usually that's a published-on-a- Mac extension, if I recall.
At any rate, can you put the file up on a Box, Dropbox, FTP, etc...and send me a URL?
I should be able to published it so you can view the project (it would be an .exe).
It can't be converted to anything though - not without manual effort. -
Just upgraded to Mavericks. Now I cannot access scans from my hp scanner. After it complete the scans and I try to save as tiff, jpeg or pdf I get a either a grey blur or a message that says cannot save because the file cannot be written to. I did not have any problems before the upgrade. I would greatly appreciate any light shed on this.
Go to the HP site and look for drivers for your scanner. It apparently needs an updated driver to work with Mavericks.
-
I'm having troubles converting my raw files from Nikon D5200 (NEF) to DNG. I tried using Lightroom 4, but it didn't identify the folder containing the files. So i downloaded the latest DNG converter but that too didn't identify the files kept in the folder location. So I downloaded DNG converter v7.3 for D5200. It identifies the folder and files; but it is giving me parsing error on trying to convert files. I'm running Windows Vista Home Edition SP1. Kindly advise. Thank you.
I probably missed this detail in what you’ve posted, but do you see the thumbnails of the three cameras’ raw files in Finder if you don’t convert to DNG?
What has happened in the past is that the Apple raw interpreter doesn’t read thumbnails of DNGs it doesn’t like, where at least one thing it didn’t used to like was embedded lens corrections for mirrorless cameras. Are the Olympus and Panasonic mirrorless—meaning there is no optical viewfinder and everything is seen on an LCD screen or perhaps an electronic view finder? If so the reason these are different is that the camera is doing the lens distortion corrections automatically and this information is stored in the raw files and in the DNGs but Apple doesn’t know how to use these embedded lens corrections or doesn’t know how to read the newer DNG spec that does allow for this information to be embedded in the DNG, at least.
Apple could just extract the embedded jpg preview and ignore the other parts of the file it doesn’t understand, but it apparently doesn’t do this.
What I’m not sure about is if the Apple raw interpreter still has this problem or if you’re on an older system without the latest updates for camera raw decoding by Apple. -
Windows Media Player cannot play the file. The Player might not support the file type or might not support the codec that was used to compress the file
How do I fix this?That would probably be a question best taken up in on a site for Windows support questions. Not knowing anything about the movie you're trying to play, all I can suggest is to confirm that the format of the movie you wish to play is supported in your version of WMP. If it isn't, you'll either need to convert the movie or use some other player software.
Regards. -
Hello there,
I created a DPS application and I want that when you click on an image, it opens a pdf. But this one is on the ipad.
This is in case there is no internet connection.
Thank you.How to make the zip: http://helpx.adobe.com/digital-publishing-suite/help/import-htmlresources.html
How to link to the asset: Digital Publishing Suite Help | Hyperlink and button overlays
Neil -
I clicked the iCloud symbol in the top right corner of a tv show's artwork, wondering what it does, and it began to download a duplicate of that episode. I deleted the duplicated episode but everytime a open iTunes it begins to automatically download again. Help
It sounds like you may have hidden it, in which case you should be able to unhide it : iTunes Store: Hiding and unhiding purchases. (You can't turn off the hiding of items.)
But you should be keeping and maintaining a backup copy of all of your downloads and not relying on being able to redownload them - any item could be removed from the store by the rights-holders at any time, if they do then you won't be able to redownload them (nor will be able to do redownload items if you move countries). -
I have CDs, legally purchased and uploaded to iTunes (v9.1.0.79)...they were on a harddrive and now I tried to play on my new computer (iTunes v11.0.2.26), but whilst the files appear intact they skip through each song in seconds...why? and how to fix?
I don't recognise the symptoms as such, but here are a couple of things to try.
Check all tracks
Unchecked tracks are skipped during normal track to track playback. Go to the Songs view and CTRL-click on an empty checkbox, or CTRL-click on a filled one twice. This will ensure all tracks are checked.
Repair permissions
To make sure that your iTunes folder (or media folder if located separately) has the correct permissions, right-click on the folder and click Properties, then go to the Security tab and click Advanced. If necessary grant your account and SYSTEM full control to this folder, subfolders and files, then tick the option to replace permissions on child objects which will repair permissions throughout the library. This is the XP dialog but later versions of Windows shouldn't be too different.
You can also clear the Read-Only flag for the entire library from the Properties dialog.
tt2 -
I want a stamp to write to the file metadata and be able to display the result in windows explorer. I have read PDF Stamp Secrets and can write to Custom Metadata but don't know how to display that custom field in explorer. Can I have the stamp write to a standard (non-custom) metadata field? Or, how do it get the custom field to display in explorer? Windows is pretty stingy with the file details it displays for PDF files, in fact there are no editable fields provided (like are available for Office files). I want this to work for multiple users hopefully without having to get the IT group involved to make (or allow) system modifications to make this work. Any ideas? Thank you.
Metadata for Windows Explorer is tagged with different names than the metadata for PDFs. Acrobat cannot copy the metadata to the tagged items of the file header.
There are tools like EXIFTool that can manipulate the data as necessary. Phil Harvey also provides the details about the file types and their metadata tags and values so you should be able to map the tags that need to be updated. -
We are using CSS 6 (not Cloud) for our yearbook. Starting today pages are giving message that we are missing a bunch of plug-ins so files can't open. How can I get these plugins? Why is this happening?
We are using CSS 6 for our yearbook. Starting today pages are giving message that we are missing a bunch of plug-ins so files can't open. We are 2 weeks from printer deadline so thia has to get fixed fast. We didn't update anything with the program. We ca
-
I have updated both my Itune and Ipad mini , however, when I click on the device icon (beside itune store), it disappear. Why does this happen?
I'm not sure why this would happen. But I think I did see another post a week or two ago about this. Have you tried rebooting your computer and resetting your iPad.
To reset your device. Press and hold the Home and Sleep buttons simultaneously ignoring the red slider should one appear until the Apple logo appears. Let go of the buttons and let the device restart. See if that fixes your problem. -
how can I see my iphone backup to my hp computer - I want to actually see some of the files on the backup to be sure it actually worked
You can't see them as such. The entire backup is stored as a database, sql file. You can find the backup file here:
Windows XP: \Documents and Settings\(username)\Application Data\Apple Computer\MobileSync\Backup\
Note: To quickly access the Application Data folder, click Start, and choose Run. Type %appdata% and clickOK.
Windows Vista and Windows 7: \Users\(username)\AppData\Roaming\Apple Computer\MobileSync\Backup\
Note: To quickly access the AppData folder, click Start. In the search bar, type %appdata% and press theReturn key.
You will need an sql reader to view the contents, -
I have adobe CS6 on my old hard drive and i wish to transfer it over to my new hard drive. I no longer have the disc which it came on. How do I do this? also i have only ever put a single copy on a laptop and it is alowed 2........if that matters.
deactivate (help>deactivate) on your old hd.
then install using the installation file(s) and your serial number.
Downloadable installation files available:
Suites and Programs: CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4, CS4 Web Standard | CS3
Acrobat: XI, X | 9,8 | 9 standard
Premiere Elements: 13 |12 | 11, 10 | 9, 8, 7
Photoshop Elements: 13 |12 | 11, 10 | 9,8,7
Lightroom: 5.7.1| 5 | 4 | 3 | 2.7(win),2.7(mac)
Captivate: 8 | 7 | 6 | 5
Contribute: CS5 | CS4, CS3
Download and installation help for Adobe links
Download and installation help for Prodesigntools links are listed on most linked pages. They are critical; especially steps 1, 2 and 3. If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.
window using the Lightroom 3 link to see those 'Important Instructions'.
Maybe you are looking for
-
URM How to set default value in the "New Check-in" - "Folder" field
Hello everyone, I'm trying to find out how to set the default value for the "folder" field in a check-in profile created using the Configuration Manager. If I browse to the folder in the "Browse Content -> Folders" menu and check-in a file inside the
-
ITunes can't find any of my music
I've been using iTunes for a long time now. I keep all my music on an external (portable) drive with the exception of podcasts or downloaded music from the store. All of a sudden iTunes can't find any of my music. Everytime I click on a song to play
-
Dark Prints with Photoshop CS3 and CS4 but not Lightroom
Hi, To start,I have calibrated my dell monitor with eye-one pro as well as my epson 7800. i am running vista 64 bit on my PC... When i use photoshop (CS3 or CS4) the images look fine on the screen and come out really dark on the printer. When i use l
-
I can not activate my iPhone 3gs. What is the problem ? why ? Solutions ?
Good day! I just bought an Iphone 3gs and I did an update and now I can not activate it. It says : the actiivation server is temporary unavaliable. When Iam trying to do throught iTunes it says that there is no sim card (((. This is my first iphone.
-
[Solved]Webcam Creative Live not working
Hi, I think there's a problem with one of the latest updates, my webcam was working fine since before myself@Desktop ~]$ dmesg |tail usb 2-2: USB disconnect, address 3 gspca: disconnect complete usb 3-1: new full speed USB device using uhci_hcd and a