I have a dropdownlist that have All, Dog, Cat
and a GridView
want the dropdownlist show All
I will show all the item from the database but
want is show cat in the dropdownlist
It only show all the item that are cat only and not show all
can I have a simple of this
Loading

Anurag SarkarRank #1,049 · 1.8K reputationPosted Jul 17, 2013, 10:31 AM EDT
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Jul 17, 2013, 10:57 AM EDT
I attached a sample code just check that. if any problem reply.
Anurag SarkarRank #1,049 · 1.8K reputationPosted Jul 17, 2013, 11:06 AM EDT
{
SqlDataAdapter da = new SqlDataAdapter("select * from Category", con);
DataTable dt=new DataTable();
da.Fill(dt);
DataList1.DataSource=dt;//Here DataList1 is the name of the Drop Down Box.
DataLIst.DataBind();
}
Thanx please change the code.
Tan Kai Kai114 reputationPosted Jul 18, 2013, 5:41 AM EDT
Anurag SarkarRank #1,049 · 1.8K reputationPosted Jul 18, 2013, 6:22 AM EDT
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Jul 18, 2013, 7:16 AM EDT
I attached a sample code for gridview just check that. if any problem reply.
Tan Kai Kai114 reputationPosted Jul 19, 2013, 12:18 AM EDT
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Jul 19, 2013, 12:51 AM EDT
http://aspsnippets.com/Articles/Simple-Insert-Select-Edit-Update-and-Delete-in-ASPNet-GridView-control.aspx
http://www.aspdotnet-suresh.com/2011/02/how-to-inserteditupdate-and-delete-data.html