Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

how to select multiple values from single column

$
0
0

i am using this code to to bind data from one value i want to bind data from more than one value 

now here is the code searching data from value 1 i want to search from 1 3 5

public void LoadData()
    {
            DateTime datetime = Convert.ToDateTime(Date.Text);
            SqlCommand cmnd = new SqlCommand("SELECT id,Build_name,Dept,Floor_no,date_time,Rec_Status FROM  Tech_data where Rec_Status=@Rec_Status ");
            cmnd.Connection = con;
            cmnd.Parameters.Add("@Rec_Status", SqlDbType.VarChar).Value =1;
            SqlDataAdapter da = new SqlDataAdapter(cmnd);
            DataSet ds = new DataSet();
            da.Fill(ds);
            GridView1.DataSource = ds;
            GridView1.DataBind();
    }




Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>