adding data two times

S

Selen

Hello,
I add my data to dropdownlist on load .My data count is 3 But the first page
load my data comes 6 .The others it comes 3. My code is

SqlConnection conn=new SqlConnection ();

conn.ConnectionString
="server=(local)\\sql2000;database=db_Kalite_Data;uid=sa;pwd=antalya";

conn.Open ();


string strCommand="select EqpNo from tb_Equipment";

DataSet ds=new DataSet ();

SqlDataAdapter da=new SqlDataAdapter (strCommand,conn);

da.Fill(ds,"tb_Equipment");


this.drpEqpNo .DataSource =ds.Tables ["tb_Equipment"].DefaultView ;

this.drpEqpNo .DataTextField ="EqpNo";

this.drpEqpNo .DataBind ();

this.DataBind();

Thanks
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top