| Author: Ritesh N. Jain 28 Aug 2008 | Member Level: Gold | Rating: Points: 4 |
As you already know the name of coulmn in advanced so why to use Datatable to get the name?also you need to pass datatable to ddl's datasource and not column name, simply change your above code with this one
ddlSiteNames.DataTextField ="Site Name"; ddlSiteNames.DataValueField = "SnagId" ddlSiteNames.DataSource = dtTable ddlSiteNames.DataBind();
|