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

On select change event of the list box use the following code.

Dim con as new sqlconn("connectionstring")
con.open()
dim da as sqlda("select * from table where cityname=" &
listbox1.selecteditem)
dim ds as new dataset
da.fill(ds)

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we override the enablepartialrendering property of the scriptmanager class?

639


Fetch one page value to another page without using state-managment ?

528


What is session in http request?

551


What is web configuration file and how to use in web application

591


How you will improve web application performance?

544






How can you pass multiple complex types in Web API?

565


What are the different validators in asp.net?

554


Where session id is stored?

532


What is the adavantage of using ASP.NET routing?

644


How can you ensure a permanent cookie?

549


What is different authentication mechanisms used in ASP.NET?

582


What New Features comes with ASP.NET Web API 2.0?

540


What is user control in asp.net?

508


Explain server-side scripting?

568


Web API supports which protocol?

848