it's going to be messy, i'd rather just read the strings from the file and
add them to the dropdown
//setup a loop here
Dropdownlist.items.add(new listitem(passwordtext,passwordtext));
if you insist on using a dataset it would go something like this
DataSet dsTemp = new DataSet();
DataTable Tables = new DataTable();
dsTemp.Tables.Add(Tables);
dsTemp.Tables[0].Columns.Add("PassWord", System.Type.GetType(
"System.String" ) );
DataRow myRow = dsTemp.Tables[0].NewRow();
myRow[0] = "password read from file";
dsTemp.Tables[0].Rows.Add(myRow);
dropdownlist.datatext = "PassWord";
dropdownlist.datasource = dsTemp;
dropdownlist.databind();
you can see that this is really messy code.
--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"ruca" <> wrote in message
news:uvEWuiS$...
> And What I want to appear in my dropdownlist it's only the Name
>
>
>
> "ruca" <> escreveu na mensagem
> news:Oz9W4dR$...
> > It's quite easy:
> >
> > Name, Code, Password
> > Name, Code, Password
> > Name, Code, Password
> > Name, Code, Password
> > Name, Code, Password
> > Name, Code, Password
> >
> >
> > ruca
> >
> >
> > "Paul Clement" <> escreveu na
> > mensagem news:...
> > > On Thu, 26 Feb 2004 15:49:47 -0000, "ruca" <> wrote:
> > >
> > > ¤ Hi,
> > > ¤
> > > ¤ Can I read a .TXT File to a DataSet? How can I do that?
> > > ¤ I want to read his lines to a DropDownList. This lines are the names
> of
> > > ¤ employees that I export from an application that I have.
> > > ¤ I export them to a .txt file and I want to "work" with this
employees
> in
> > my
> > > ¤ aspx page. Can you help me?
> > > ¤ It's a little bit strange, but it's what I need. 
> > >
> > > Could you post a couple of lines from your text file so we can see the
> > format?
> > >
> > >
> > > Paul ~~~
> > > Microsoft MVP (Visual Basic)
> >
> >
>
>