adding data two times

Discussion in 'ASP .Net' started by Selen, Mar 3, 2004.

  1. Selen

    Selen Guest

    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
    Selen, Mar 3, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?bWF2cmlja18xMDE=?=

    SetAuthCookie works some times and fails some times?

    =?Utf-8?B?bWF2cmlja18xMDE=?=, Mar 23, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    497
    =?Utf-8?B?bWF2cmlja18xMDE=?=
    Mar 23, 2006
  2. =?Utf-8?B?bWF2cmlja18xMDE=?=

    Forms Authentication Fails some times and not some times???

    =?Utf-8?B?bWF2cmlja18xMDE=?=, Mar 28, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    480
    =?Utf-8?B?bWF2cmlja18xMDE=?=
    Mar 28, 2006
  3. djskrill
    Replies:
    9
    Views:
    686
    djskrill
    Oct 1, 2003
  4. Peng Yu
    Replies:
    17
    Views:
    670
    Peng Yu
    Sep 14, 2008
  5. Jack Steven
    Replies:
    2
    Views:
    415
    Chris Rebert
    Mar 9, 2009
Loading...

Share This Page