Click here to Skip to main content
15,886,026 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to bind data from database in dropdownlist .
now i am getting data from table in dropdownlist but its show in character wise not in word wise why..
plz help me
Posted
Comments
King Fisher 9-May-15 4:00am    
Not Clear .
King Fisher 9-May-15 5:29am    
what do u mean "its show in character wise not in word wise"?

1 solution

You can use namespace

C#
using System.Data.SqlClient;
using System.Data;


and write code and call the getID method()


C#
public void getID()
    {
        SqlDataAdapter adp = new SqlDataAdapter("select ID From Student", con);
        DataSet ds = new DataSet();
        adp.Fill(ds);
        DropDD.DataValueField = "ID";
        DropDD.DataSource = ds;
        DropDD.DataBind();

    }
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900