Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

One Listbox showing all cities. If you select one city in
list box the information related to that particular city
should be displayed in Datagrid . How do you do that?

Answer Posted / sathish

protected void ddlcity_SelectedIndexChanged(object sender,
EventArgs e)
{
sqlConnection con= new sqlConnection(" ");
string str="select * from table where city ='" +
ddlcity.SelectItem.Text ="'";
sqlDataAdapter da= new slqDataAdapter(str,con)
dataset ds = new dataset;
da.fill(ds,"City");
dgview.datasource=ds.tables["City"];
dgview.dataBind();
}

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about the Class view window?

931


What's the ASP.Net Application life cycle?

1039


Define static member?

935


What is a reflection?

937


What are the new login controls in asp.net 2.0?

928


What is AutoPostback?

1091


How many types of sessions are there in asp net?

950


What tags do you need to add within the asp:datagrid tags to bind columns manually? Give an example.

984


Which .NET framework supports Web API?

1005


How do cookies work? Give an example of their abuse.

925


What is bound controls

1002


How can we create pie chart in asp.net?

1031


What is in a session cookie?

932


Why do we need Sessions?

995


What is Bundling and Minification in MVC?

961