473,775 Members | 2,610 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dynamically creating tables

I have a snipet of code written to search a directory.
With help from the group I figured out how to place all
the files from a direcotory in a single column table
hyperlinked to the file.

The portion of code needed for the iterations is below to
help you understand.

Now I need to take that one step further:
-I want a table
-For each iteration of 'dir' I want the results of 'dir'
to become a column header.
-For each iteration of 'File' I want the results
of 'FIle' to be placed under 'dir' header.
-As this loops through I would like 3 columns in the
table. If more than three iterations of 'dir' occur then
the fourth iteration would go below the first iteration
in column 1.

An example of what I am seeking can be found on my
website: http://www.lbrspec.com/TrussSearchResults.htm

If I could get any help with any part of this project- I
would be greatly appreciated.
Private Sub Main(ByVal Path As String)
Dim dirs() As String = Directory.GetDi rectories(Path)
Dim File As String
Dim dir As String

For Each dir In dirs
Dim files() As String = Directory.GetFi les(dir)

For Each File In files
Dim row As New TableRow()
Dim cell As New TableCell()
Dim hyp As New HyperLink()
Dim i As Integer = 1
Dim x As String 'New Literal()
With hyp
.NavigateUrl = File
.Text = "file" & i
.ID() = i
End With

cell.Controls.A dd(hyp)
row.Controls.Ad d(cell)
Table1.Rows.Add (row)
i = i + 1
Next
Next
End Sub
Nov 17 '05 #1
0 1044

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
15606
by: Billy Cormic | last post by:
Hello, I am interested in dynamically creating temp tables using a variable in MS SQL Server 2000. For example: DECLARE @l_personsUID int select @l_personsUID = 9842
7
2084
by: who be dat? | last post by:
I need some help here. I'm creating a list on a page where the list is created from a dataset with two tables linked with a datarelation. The first table is a list of groups while the second table is a list of items in that group. I want to show these items in what would basically look a lot like a tree view. I decided to just show everything in a placeholder control on an aspx form. First, I display a groupname from the first table...
6
6100
by: Tex | last post by:
I am writting a survey system web application. I am using ASP.Net 2, C# and MS SQL 2005. I am able to store surveys and questions associated to the surveys just fine. The problem I am having is Dynamically creating a survey on a page. I have read some MS articles on dynamic creation of web forms and have been able to create one question on a page. I am not sure how to create a variable amount of different types(radio button lists,...
18
3979
by: blueapricot416 | last post by:
I am on a team designing the front end of an Intranet application. The backend guys will be using JSP and AJAX-like functionality to make server requests that must dynamically change elements on a page. What is the best way to create and populate tables, which will exist in floating DIVs (with drag and drop capability)? It only has to work with IE6. I know of two ways:
6
5459
by: RSH | last post by:
Hi, i have a situation where I need to dynamically create objects in a loop. My question surrounds intantiation naming in such a scenerio. Below is a snippet that is basically hardcoding each object. My problem is that I would like to create the objects dynamically but I can't figure out how to do it How would I go about dynamically creating the required objects so that I could be using anywhere from 2 - 10 etc. ?
4
6480
by: m.wanstall | last post by:
I have a crosstab query that compiles data for Months of the year. I have a stacked select query on top of that crosstab query that uses the latest 2 months data and exports it to a fixed length flat file. Ideally I would like to be able to just select the Last 2 Columns of the Crosstab query as inputs to the Select query WITHOUT having to go in month after month and manually change it... I may be asking a bit much here but is there a...
0
1570
by: lianaent | last post by:
Hi All, I'm brand new to asp.net 2.0, and have a simple task of just creating a quick and dirty data entry form with SQL Server 2005 on the back end. I added a gridview to my form, and I can populate it dynamically by choosing from a dropdown that I populate dynamically from the database sys.tables table. When I choose a table from my dropdown, poof, the gridview is beautifully loaded with all the columns and rows, and the edit and delete...
0
1374
by: Syoam4ka | last post by:
My project is about jewellery. I have devided my jewelery into main types, which each one of them has sub types, and each one those sub types has the jewellery. I have a tabcontainer. It includes tabpanels such as:Catalog,Terms,SiteMap.ViewCart ,etc. All the jewellery Intro is in the Catalog panel. when I first click the Catalog panel it Introduces me all the main types of the jewellery(It's all done dynamically from the cs file).The...
2
6533
by: ssmith147 | last post by:
Hi, I'm somewhat familiar with access and vb programming (I can read someone else's code, for the most part), but I'm still very green when it comes to creating solutions for my own needs. I'm trying to create a db for a friend's business. I have two issues that I'm wrestling with. First is how to dynamically create a text box on a form. I'm building a form that relates information between two tables (A, B). Table B is the source of...
1
4913
by: semomaniz | last post by:
I have a form where i have created the form dynamically. First i manually added a panel control to the web page. Then i added another panel dynamically and inside this panel i created tables. I have set text boxes and labels inside the table rows. I then added a button. All of these are done through code. The problem that i am having is i can get the value from a text box with resides inside the first panel (out side of panel that is...
0
9622
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10268
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10107
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10048
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6718
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5360
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5486
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3611
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.