Use DTNScreate function dbo.GetPatientFirstName()Returns TableasReturn select firstname from tblpatientdetails
Using system.data.sqlClient;SqlConnection sqlConn=new SqlConnection("You connection");SqlCommand sqlCmd=new SqlCommand();SqlDataReader dr;sqlCmd.Connection=sqlConn;sqlCmd.CommandText="select * from dbo.GetPatientFirstName()";sqlConn.Open();dr=sqlCmd.ExecuteReader();DropDownList1.DataSource=dr;DropDownList1.DataTextField="firstname";DropDownList1.DataTextValue="firstname";DropDownList1.DataBind();