how to set a default dropdownlist selecteditem
<p>I have a login page where user enters Username(textbox), Password(textbox), and location(dropdownlist) then login. </p>

<p>On the server page, for the location dropdonwlist I have a connection string to access SQL server database to get all locations from location table and bound the data to the dropdownlist. </p>

<p>For the dropdownlist.SelectedItem, What I want to do is that once user enters Username, onChange, the default location for the particular user should be the selected location before the user clicks Login. This default location is defined by locationID(FK) in the Login table which has loginId, username, password, and locationID as its columns. I want the process of retrieving locationID (accessing a DB table) to happen on the server side, then pass the locationID to the client side where I can call a function to select a default dropdownlist item according to the locationID. What's the way to accomplish this?? Thanks</p>

<p>Programming Language C#
Database SQL Server 2005</p>
