[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

ruca

2/6/2004 4:02:00 PM

I have this in code:
I'm reading data from a .TXT file
----------------------------------------------------
Sub ProcessUser(txtLine)
On Error Resume Next

Dim p1, pos as Integer
Dim Cd, LineAux, NomeFunc, Pass, strLabel as String
Dim row as DataRow

p1 = instr(txtLine,",")
if p1>0 then
Cd=left(txtLine,p1-1)
LineAux = mid(txtLine,p1+1)
pos = instr(LineAux,",")
NomeFunc = left(LineAux,pos-1)
Pass = mid(LineAux, pos+1)
'Response.Write CdFunc & "-" & NomeFunc & "-" & Pass
strLabel="CdRcs = "& "'" & Cd & "'"
response.write(Cd)

row = table.NewRow()
row("CdRcs") = Cd
row("NmAbreviado") = NomeFunc
row("Key") = Pass

table.Rows.Add(row)

end if
End Sub

Function ler_users() As DataTable
On Error Resume Next
Dim objFicheiro, LerUser as Object

objFicheiro = CreateObject("Scripting.fileSystemObject")
LerUser = objFicheiro.OpenTextFile(Server.MapPath("func.txt"))

While not LerUser.AtEndOfStream
ProcessUser (LerUser.ReadLine)
End While

LerUser.Close
LerUser = nothing

return table
End Function
---------------------------------------------

I want to put in a dropdownlist the name of people but I can't. For that I
have this:

asp:DropDownList id="cxFunc" runat="server" DataSource="<% # ler_users() %>"
DataTextField="NmAbreviado" DataMember="CdRcs" DataValueField="CdRcs"


Can you help me??? How can I put data in the dropdownlist????????????????


--
Thanks (if you help me)
Hope this helps (if I help you)

ruca