dropdownlist

How to set the option value through model

I need to have the value for the option in the following: I have created my select as follows: <select id="fromSelectBox" multiple="multiple" > <% foreach (var item in Model.Projects) { %> <option><%=Html.Encode(item.Text)%></option> <%} %> </select> How do I se...

OnSelectedIndexChange only fires on second click when using custom page validation script

Okay.. this is hard to explain, so here it goes. I have an update panel which contains a number of controls. The update panel is triggered by the OnSelectedIndexChanged event of a dropdownlist called: ddlUSCitizenshipStatus. It works as expected when I selected a new item. However, if I leave ddlUSCitizenshipStatus with the default v...

MFC Combo-Box Control is not showing the full list of items when I click the drop-down menu...

I'm coding an app in MSVS 2008, which has a ComboBox control which I initialize thru the code as below: static char* OptionString[4] = {"Opt1", "Opt2", "Opt3", "Opt4"...

ASP.Net: need help with dropdown list bound to a database column

I have created database which has columns - MemName - monthlyAmt - CurrentInstAmt I have bound the Memname column with a DropDownList box; onselection of memname value in DropDownList box, the corresponding values of currentInstAmt and monthlyamt should be displayed in Textbox. I am beginer in asp.net code - DataSet dsMemname =...

ASP.NET DropDownList Replacement

Currently, I'm populating a drop down list when a file is created in a configurable folder. if (!downloadRspDropDown.Items.Contains(new ListItem(txt, fileData.FullName)) Then, I add the file and remove "No Responses Available". However, if the same file is resubmitted (i.e., the file name is the same but the timestamp is different), t...

How to make a google-like auto complete textbox with C# in an application?

Hey! I tried to find a solution but I didn't found what I was searching for. So here is my problem. I want a google like behaviour with a textbox. As I type "dum" it should find dummy in the database and display it as option under the textbox. It should be selectable. I don't use ASP.net or any other stuff. Just pure C#. Thanks for you...

ASP.NET MVC - dropdown list post handling problem

I've had troubles for a few days already with handling form that contains dropdown list. I tried all that I've learned so far but nothing helps. This is my code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using CMS; using CMS.Model; using System.ComponentModel.DataAnnotations; namespace Portal....

DropDownList SelectedIndex problem in FireFox after page refresh

I've got DropDownList in UpdatePanel as shown below: <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:DropDownList ID="DropDownList1" runat="server"> </asp:DropDownList> <div> Index: <asp:Label ID="Label1" runat="server" Text=""></asp:Label> ...

DropDownList problem/doubt

Hi everybody!! I have one dropdownlist like this bellow.. the problem is that if I have more than 30 ListItem the list will have 30 elements/rows display and the rest to scroll. Is there a way to show only 10 elements and scroll the rest? I read in some pages that this is not possible. Is that true? <asp:DropDownList ID="id" ru...

Change dropdown size for .NET touchscreen application

I'm trying to create a .NET touchscreen application. I would like to be able to create a large dropdown. By increasing the font size, the button stays the same width but increases in height, meaning it's long and thin. Is there a way to 'scale up' .NET controls so they are large in size for touchscreen applications? ...

Adding custom options in bound dropdown in asp.net

I have a bound dropdown list populated with a table of names through a select, and databinding. it shoots selectedindexchanged that (through a postback) updates a certain gridview. What happens is, since it runs from changing the index, the one that always comes selected (alexander) can only me chosen if you choose another one, then cho...

Drop-Down List Filled with Images in ASP.NET?

How do I make a drop-down list that is filled with image items? I want to be able to see a list of images in the list with text titles, be able to select one exclusively, and have the text title appear in the selection box on top of the list. Does anyone know how this can be accomplished? ...

DropDownList Value not changing with UpdatePanel and ModalPopupExtender

Greetings, I have an asp.net webpage with an modalpopupextender inside of an updatepanel. When I click Ok on the popup, I can get the textbox values from the popup just fine, but the DropDownLists have the old/default value, not the new value I have selected for them. All the controls on the popup are set to enableviewstate = true, and...

JQuery chained filter dropdown

Hi, I'm trying to implement chained filter dropdown using just javascript - jquery. The solution I need is http://www.codeassembly.com/Simple-chained-combobox-plugin-for-jQuery. However I can't use this solution as it depends on a PHP file. Are there ways to implement this solely using javascript (client and/or serverside)? Many Tha...

SelectedValue of DropDownList is not the one I selected when Enabled=false

Hiya, I have a few DropDownLists on a webform each pointing to a SqlDataSource. Some of these datasources use one of these DropDownLists for a select parameter, filtering the list to specific categories. For certain users two of these DropDownLists are to be automatically set and disabled. When I submit the form with the drop down...

“OnClick” action to asp.net dropdownlist item.

My situation is a little strange I guess, suggestion of engineering is acceptable. I have a DropDownList, on my "user" creation, called "city". When I'm creating the user I can create other city, but for this I have a button which redirect to other page. So, ok. I've created the new City and now I click on my DropDownList of cities and...

Dropdownlist and Datareader

After trying many solutions listed on the internet I am very confused now. I have a C#/SQL web application for which I am simply trying to bind an ExecuteReader command to a Dropdownlist so the user can select a value. This is a VS2008 project on an XP OS. How it works is after the user selects a table, I use this selection as an inp...

How to format individual DropDownlist Items (color, etc.) during onDataBinding event

Hi, I have a basic DropDownList bound to a ObjectDataSource: <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="objDataSource1" DataTextField="FieldName" DataValueField="FieldID" /> The DataTable from which it receives the DataTextField and DataValueField values also returns some other interesting ...

Populating a Dropdown list in PHP dynamically

Hi, I have a small PHP page which contains two drop down lists I need to populate the second one according to the result selected in the first drop down list .... is this possible? In other words I need to use the value selected from the first drop down list and use it in the dB query used to populate the second drop down list (but th...

How to return DropDownList selections dynamically in ASP.NET?

This is probably a simple question but I am developing a web app in C# with DropDownList. Currently it is working for just one DropDownList. But now that I modified the code so that number of DropDownLists that should appear is dynamic, it gives me error; "The name 'ddl' does not exist in the current context." The reason for th...