Databinding issue with dropdown

N

Neel

I would like to bind a custom sql statement such as

sSqlStmt = "SELECT PgmSchID, SessionBegDate" & " - "
& "SessionEndDate" & " - " & "SessionTime" & " - "
& "SessionDay AS PgmSessions" _
& " FROM ProgramScheduling WHERE PgmID
= '" + ddlPgm1.SelectedItem.Value + "'"

below is my code which i am not able to bind
OleRdr = clsDBAccess.ExecuteReader(CommandType.Text,
sSqlStmt)
ddlPgmSess1.DataSource = OleRdr
ddlPgmSess1.DataTextField = "PgmSessions"
ddlPgmSess1.DataValueField = "PgmSchID"
ddlPgmSess1.DataBind()
ddlPgmSess1.Items.Insert(0, "Select
Session")
ddlPgmSess1.SelectedIndex = 0

help me out
Neel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top