T
troy.forster
I am sure this must be about the simplest thing to do. I can whip
something off in 10 different languages and environments with no
problem. But VisualStudio 2003 and ASP.NET is sooooo frustrating!!!
My example is simple. I have an Access table (mytable) with two fields
of type text (userid and password).
I want to display a dropdownlist on a page and have it list the
userids. Nothing more.
Since VisualStudio is a little more graphical than, say, notepad, I
want to take advantage of drag and drop programming.
I create my database connection in the server panel.
I add an OleDbConnection, OleDbDataAdapter and DataSet (not sure if
this is right but it seemed like I was being lead in that direction).
Next I drop a dropdownlist on the form. Goto properties and set
DataSource = DataSet11
DataMember = mytable
DataTextField = userid
DataValueField = userid
Build and view and I get a nice white page with an empty dropdown list
sitting on it. Tried addind DataBind() to the page_load and still
nothing.
Tried searching help/gotdotnet/msdn/etc and find plenty of examples on
databinding to arraylists and other datasource types but nothing that
helps me out. Some examples I didn't try but they involved 20-30 lines
of code. Surely it doesn't take that much code now, in a drag and drop
IDE, to do what we could do in ASP.Classic and notepad in 4 lines?
Please help, or better yet point me to a resource that so far has
eluded by many Google attempts?
Thanks,
T
something off in 10 different languages and environments with no
problem. But VisualStudio 2003 and ASP.NET is sooooo frustrating!!!
My example is simple. I have an Access table (mytable) with two fields
of type text (userid and password).
I want to display a dropdownlist on a page and have it list the
userids. Nothing more.
Since VisualStudio is a little more graphical than, say, notepad, I
want to take advantage of drag and drop programming.
I create my database connection in the server panel.
I add an OleDbConnection, OleDbDataAdapter and DataSet (not sure if
this is right but it seemed like I was being lead in that direction).
Next I drop a dropdownlist on the form. Goto properties and set
DataSource = DataSet11
DataMember = mytable
DataTextField = userid
DataValueField = userid
Build and view and I get a nice white page with an empty dropdown list
sitting on it. Tried addind DataBind() to the page_load and still
nothing.
Tried searching help/gotdotnet/msdn/etc and find plenty of examples on
databinding to arraylists and other datasource types but nothing that
helps me out. Some examples I didn't try but they involved 20-30 lines
of code. Surely it doesn't take that much code now, in a drag and drop
IDE, to do what we could do in ASP.Classic and notepad in 4 lines?
Please help, or better yet point me to a resource that so far has
eluded by many Google attempts?
Thanks,
T