|
-
August 26th, 2005, 03:12 AM
#1
File Handling! Reading Text File!
Code:
<%@Import Namespace="System.IO"%>
<script language="vb" runat="server">
Sub page_load(Sender As Object,e As EventArgs)
Dim filetoread as string
filetoread=server.mappath("Output.txt")
dim filestream as StreamReader
filestream = File.Opentext(filetoread)
Dim read as String=fileStream.ReadToEnd()
dim str1, s as string
dim i,k as integer
dim str1, str2(), s as string
dim i,k as integer
for k=0 to (read.count)-1
str1=read.item(k)
str2=str1.split("~")
dim r As New TableRow()
dim c11 As New TableCell()
dim chkbox11 as new checkbox
c11.Controls.Add(chkbox11)
r.Cells.Add(c11)
for i=0 to 5
dim c As New TableCell()
c.Controls.Add(New LiteralContro(str2(i)))
r.Cells.Add(c)
next
table.Rows.Add(r)
next
end sub
All i want to do is read the text file , split it , and display it in the Web page!
However , i have some trouble with it , can any one help me plz!
-
August 27th, 2005, 03:01 PM
#2
Re: File Handling! Reading Text File!
Well... what kind of problems are you having. Details would help on this one.
Good Luck,
Craig - CRG IT Solutions - Microsoft Gold Partner
-My posts after 08/2015 = .NET 4.x and Visual Studio 2015
-My posts after 11/2011 = .NET 4.x and Visual Studio 2012
-My posts after 02/2010 = .NET 4.0 and Visual Studio 2010
-My posts after 12/2007 = .NET 3.5 and Visual Studio 2008
-My posts after 04/2007 = .NET 3.0 and Visual Studio 2005
-My posts before 04/2007 = .NET 1.1/2.0
*I do not follow all threads, so if you have a secondary question, message me.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|