473,382 Members | 1,545 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

how to bind data to dropdown list from database with out postback in asp.net3.5

Hi,
my doubt is i have two dropdownlists with the name ddlcity and ddluniversity.
i am binding data for ddlcity from city table and ddluniversity from university table. my table columns are like City(c_id,c_name) and university has columns are like
university(u_id,u_name,c_id).
when i select a city from ddlcity dropdownlist then what are the universitis are available in city those are bind to ddluniversity with out postback.
please give me the code for this doubt.
Aug 29 '11 #1
1 2310
Frinavale
9,735 Expert Mod 8TB
You are going to need to post back to the server unless you somehow store the university listings and their corresponding cities in the page somehow...so that you can filter the list via JavaScript.

However, you can use an UpdatePanel to post back to the server so that the whole page is not refreshed upon returning. It will appear as if no postback has occurred because only the content that is within the UpdatePanel will be updated.

Since the JavaScript version is going to be very complicated I recommend the UpdatePanel approach.

-Frinny
Sep 2 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Dmitry Korolyov [MVP] | last post by:
Is that possible? In other words, I want a dropdown list (and other list-type controls) which appears in edit more of a templated column to be populated with data at the run time. An attempt to do so...
4
by: anonymous | last post by:
Hi Folks, I have a form with two Dropdown list boxes, which get loaded with data from Database. DropDownList1 gets data from Table1 and DropDownList2 gets data from Table2 Table1 has a...
0
by: john | last post by:
I have a dropdown with a SelectedIndexChanged event handler. I want the event to only get called if the dropdown list was the control that caused the postback. But if the value of the list is...
1
by: Larry Rekow | last post by:
Using: MS SQL, VS.Net 2003, VB.Net Each night our SQL db imports two text file reports into two tables: Table 1 has info on various shipments (shipment number, date, destination, etc.) Table 2...
5
by: david | last post by:
I have a question in the following. Any one could give me a help? Thanks David The dataset is declared and created at Class level. My source code is here: Private Sub...
1
by: Patrick Olurotimi Ige | last post by:
Populating some Data to a DropDown control (after postback)i would like to display the result in a TextBox and if possible be able to EDIT and Update the Data populated.. What i really want to...
4
by: Dica | last post by:
i've got a dropdown list with various options added to it. i want to add a button that allows the user to "Add New Option' which should create a blank row on the dropdown list and allow the user to...
2
by: Sam | last post by:
A) Destination Table with 4 Fields. 1) Last Name 2) First Name 3) State 4) Zip Code. B) Look up table State/Zip Code with 2 Fields
3
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi I have a generic list of data list <typelistcategory; listcategory = new list <type>; I also have a dropdown box that I have put into a template column of a gridview. I was able to populate...
3
by: John | last post by:
I have two dropdown lists that I have bound to a datatable and set the DataTextField and DataValueField for. Both lists show the values I expect from the database. However, when I need to access...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.