Last post Aug 07, 2007 02:16 PM by wonjartran
Aug 06, 2007 09:14 PM|wonjartran|LINK
I tried to display a list of c:\inetpub\wwwroot\ files in a GridView. By right-clicking
the GridView and clicking Edit Column, I can add a HyperLinkField to the GridView fields.
On the Behavior properties, I can type a http://ServerName/fileName string to
display this url to the whole coumn. These links (in fact, only one link) worked
perfectly on the GridView presentation.
Just wondering how can I give each row a unique http://.. string? Where can I
get information on how to define the Edit Column properties?
Aug 06, 2007 09:53 PM|Scott Mitchell|LINK
In short, you need to set the DataNavigateUrlFields and DataNavigateUrlFormatString properties. There's a step-by-step example of this (along with several screenshots) in my tutorial
Master/Detail Filtering Across Two Pages.
Aug 07, 2007 11:19 AM|wonjartran|LINK
Thanks for tutorials. Unfortunately, your Master/Detail pages seemed to be good for
"detail" tables; but mine is a Detail "folder."
I have used Datalist to display the file folder. The code is shown below. I did change
DataList to GridView, but the error msgs. are the same. The first error msg is:
Handles clause requires a WithEvents variable defined in the containing type or one of its base types.
To the best of my knowledge, basically, there are two tasks not easy to code correctly.
1. The DataList/GridView object needed in the Sub Page_Load is defined later in Sub Datalist1_ItemCommand.
2. The properties (e.g. Text) of the LinkButton within the ItemCommand are not well defined.
In summary, the challenges I am working on are:
1. Display automatically a list of files from a folder.
2. Change the file path to http url.
Aug 07, 2007 02:16 PM|wonjartran|LINK
I have been working this folder/http problem for a while. One question is why
the ListBox, GridVuew, DataLIst can list the http://... address, but can not
be clicked to open the files. When we type in a document software, e.g. Word,
everything we type by http:// will work as a typerlink. Also, in VS 2005, we
can type anything and click Format menu to Convert to Hyperlink.
Is there any way I can move my flie names with http://.. to a Word table,
then we can open the linked files?