1
vote
3answers
157 views

DropDownList retains wrong input text instead of selected input from its List of Items

I have a DropDownList Control populated with List of Items from SqlDataSource. The SqlDataSource QueryBuilder chooses the Column_Names from my Database Table. If the DropDownList is provided with ...
0
votes
0answers
214 views

RadioButton selection changing dropdownlist datasource

This should be terribly straightforward, but I'm missing something. I've got a dropdownlist populated by a SQLDataSource which has its SelectCommand set from code behind. Upon initial page load, I ...
0
votes
3answers
4k views

How to set a asp:DropDownList SelectedValue to a Session Variable?

There are several articles describing how to do this is code behind however: Is it possible to set the value of a dropdownlist to a session variable on the aspx page? I am using SqlDataSource to ...
2
votes
1answer
378 views

Cascading dropDownLists in repeater. DropDownLists with SQL source and add/delete option

What is the trick to implement the following interface in ASP.NET? I think the screenshot should explain everything. Both dropDownLists work on SQL tables. [Categories],[Items] bound with ...
0
votes
1answer
453 views

create re-usable dropdown list on same page asp.net c#

I am creating a large form which re-uses the same dropdown-list of employees multiple times. it is a dynamic dropdown-list which uses a sqldatasource to get the employee list from a sql server db. Is ...
1
vote
5answers
4k views

Display more columns from the db in the DropDownList

How can I display two columns in the DropDownList in asp.net? SqlDataSourceNamePeop.SelectCommand = "select name,forename from people"; DropDownListCaptain.DataTextField = "name"; Like this it ...
0
votes
2answers
213 views

listing the selected record from database.

in my database there are id,name,surname,city fields. let's imagine there are 30 people who has same name. i want to do that; after selecting name from dropdownlist1, dropdownlist2 only shows city ...
0
votes
1answer
681 views

asp.net gridview update with dropdownlist

I have a gridview that pulls data from an sqldatasource and I when clicking Edit I want to add a dropdownlist instead of a textbox. The values of the dropdownlist must be preset as below (not pulled ...
14
votes
4answers
27k views

asp.net dropdownlist - add blank line before db values

On my page I have a dropdownlist which gets populated by database values from an SqlDataSource(see code) How can I add my own text or a blank line before the values... <asp:DropDownList ...
0
votes
1answer
656 views

Connecting 2 dropDownLists with SqlDataSource FilterExpression inside ASP:Repeater

Using 2 dropDownLists in repeater row how does one use the 1st one as a filter for 2nd? The repeater layout is simple: [category_dropDown][item_dropDown][add_button] The problem is that I can't ...
1
vote
1answer
377 views

Filtering Dropdownlist populated from sqldatasource

I have a gridview which has 2 column types which are populated from sqldatasources TransportationMode(Disabled Dropdownlist), ContainerType(Enabled Dropdownlist), Vessel - 20DC Vessel - 20RF ...
1
vote
1answer
666 views

DropDownList Two SqlDataSources

I have a DropDownList as a TemplateField in a DetailsView. I want to populate this DropDownList with all possible options that will be pulled from one SqlDataSource while assigning the selected value ...
4
votes
1answer
44k views

ASP.Net: drop down list and data source created dynamically

I have about 10 drop down list controls that get populated. Instead of copying/pasting and modifying a few fields on each, I would like to create them programmatically. Can this be done? Here is ...
0
votes
0answers
385 views

Insert SQL to Access Database by clicking a button

I have a question about C#. I create 1 button, 1 textbox, 1 drop down list in .aspx page. The user can enter the text to textbox (text only) and select one of the options in drop down list (e.g. A, B, ...
-1
votes
2answers
2k views

How to populate an ASP.NET DropDownList from one datasource and set the selected value from another?

I am looking for an example of how to populate a dropdown list from one SQL data source and set the selected field from another, it is basically exactly the same thing that is asked here ...
0
votes
1answer
520 views

How to add a “Select All” entry to a Dropdownlist tied to SQLDataSource?

I hvae a dropdownlist tied to a SQLDataSource that returns a list of Categories. Since this is used as part of a search function, how do I add a "Select All" category and ensure that such a selection ...
0
votes
2answers
269 views

DropdownList SqlDataSource does not pull *all* records

I have a DropDownList which is tied to SQLDataSource. I am running the exact same query in SQL Management studio and it pulls all the records but when I execute it in SQLDataSource, it does not pull ...
2
votes
1answer
1k views

asp.net dropdownlist embedded in a listvew not providing selected value to update parameter

I have an asp.net page with a listview which is bound to an SQLDataSource. Embedded into the Edit and Insert templates I have a dropDownList which is bound to a second SQLDataSource. In the update ...
0
votes
2answers
2k views

SelectedValue null in dropdownlist so errow thrown

This is my code in aspx: <EditItemTemplate> <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource2" ...
1
vote
2answers
19k views

Binding DropDownList SelectedValue to DataValueField for GridView Update

Ok guys, so I read this: How to set SelectedValue of DropDownList in GridView EditTemplate and I'm having the same issue. However, I don't want to bind the selected value to the displayed text, but ...
1
vote
1answer
520 views

Display dropdown menu in gridview with autogeneratecolumns enabled

I see a bunch of solutions about editing the template, but seeing as how my gridview changes between 10 different datasources a template isn't possible. Any idea of how I can accomplish this?