dropdownlist

Removing list items from the DropDownList

I have a dropdownlist inside a gridview, that is loaded from a datasource when the gridview loads. Could someone please show me how I go about looping the dropdownlist and removing certain items from the list based on a if condition. ...

How to validate required text when "Other" option is selected from a dropdownlist?

Hi, I have the following on my website. Source [DropDownList] Website Search Engine Other Other Source [TextBox] I want to use the ASP.Net validators (I think the compare validator) so that when "Other" is selected in the dropdownlist and no text is entered the validation is triggered and the page cannot be submitted. Is this pos...

SelectedValue not binding for some of the Html.dropdownlist in asp.net mvc???

I got 3 html.dropdownlists out of which only for 1 its the setting the selectedvalue.How come its binding for one of the dropdownlist not for the other 2.In the Quick Watch,all the values are proper, it even shows which value has its selected=true. but in the page it doesnt get set. Is there any solution for this? Function Index(ByVal c...

dropdownlist in asp.net mvc

i just could not figure out how i will put my data on a selectlist for it to be displayed on a dropdownlist.. i am using mysql as my database.. on my model i have this query: Imports Microsoft.VisualBasic Imports System.Data Public Class ClassCategoryConnection Inherits ClassConnection Public Function SelectCategory() As DataTabl...

alternative for tool tip and horizontal scroll for javascript drop down list

Hi, As we know IE SELECTdrop down list has limitations on tool tip on individual option items and also horizontal scroll bar. Can any one please tell any other alternative to show the tool tip using javascript or has any one implemented drop down list using div which has all the functionalites of drop down list. Thanks, Nags ...

Inserting 'space' in an ASP.NET DropDownList Control

I have an ASP.NET DropDownList control that retrieves the first and last name from a column in the database. Instead of having just one space between the first and last name, I want there to be three. How do I add the extra spaces between the two pieces of text in the DropDownList? ...

How to change PHP form redirection depending on radio button or drop-down list selected?

Hi! The idea is to be able to perform some search query depending on radio button selected or drop-down choice. I know my PHP code is wrong, that's why I need your help ;-) My testing page is available here (click). HTML code is: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-stri...

jquery cloning html problem, update DOM?

Hi, I need help of javascript / jquery experts to solve the next problem: ---- 1. this javascript alerts the id of a selected option in a select html tag: $(function(){ $("#id_productos_list").change( function(){ var op = $(this).selectedValues() alert(op); } ); }); ----2. this javascript clone html code: ...

Trouble getting an Enum to cooperate with me.

I have this problem with my code, I get an exception during compilation. Can anyone help me out? if (Page.IsPostBack != false) { System.Drawing.KnownColor enClr; System.Collections.Generic.List<System.Drawing.KnownColor> ColorList; ColorList.AddRange(Enum.GetValues(enClr.GetTyp...

Not able to set SelectedValue for DropDownList

This is a followup from http://stackoverflow.com/questions/1432790/populating-dropdownlist-inside-repeater-not-working. I'm adding a dropdownlist inside a repeater. Now I need to set the selected value, but that easier said than done... Here is my code: protected void criteriaScore_ItemDataBound(object sender, RepeaterItemEventArg...

Bug in the dropdown control?

I have a dropdown control, with some values I added in using the designer. For example, "ANY", "Male", "Female". The value for Male is set to M The value for Female is set to F The value for ANY is blank. However, although it seems to be blank, I spent hours trying to debug a parse error... And to my horror I discovered it wasn't b...

How to pass data from javascript to c# (asp.net mvc)

how i return a value from javascript function to a c# variable (in controller) and also i have a multicolum dropdown box in a form , eg book details , when the user makes the selection the book name is set in the dropdown , but when submit is hit i want the code book to be returned(this value is returned by my javascript) for billing p...

How to get the selected option value of a drop down box in PHP code

I have a dropdown box which lists a set of logos,like flower,butterfly etc. <p class="title1">Logo</p> <select name="logoMenu" class="select" size="7"> <?php foreach($logos as $logo):?> <option id="<?php echo $logo['Subproperty']['id'];?>" value="<?php echo $logo['Subproperty']['values'];?>"><?php echo $logo['Subproperty']['values...

Update Panel and Drop Down List databinding twice - lifecycle

I think this is an asp.net page life cycle question, but none the less, i can't quite figure it out. I have a drop down list in an update panel that lists users and then shows details below it (update or delete). When the I click delete, the code behind goes and clears the ddl (to remove the deleted user), and then rebinds it. All fin...

Having select options in 2 drop down menu lists?

I want to have 2 menu lists and you must select an option from each list then click the next button taking you to another page. Here's a link: http://home.comcast.net/~techjunkee/ ...

Javascript detect when drop down list is closed

Because of the issue explained in this question I have a situation where I need to attach the mousewheel event to the drop down list only when it is expanded (I do this in the onclick event). However I need to remove the mousewheel event when the list collapses. How do I go about detecting this? I can't just use the onchange event becau...

CSS Hover + Element crashing in webkit (Chrome, Safari)

Hey, Found an annoying bug today which crashed chrome and safari (so all webkit browsers?) with just CSS. It's a hover menu, hovering over an element then displaying the next dropdown level. Works perfectly in all other browsers. See here, top left 'rn': http://test.davebowker.com/rn-hover/ Hope someone has some thoughts, or knows a ...

Using Stored Procedure to populate dropdown box using Entity Framework

Hi I am using MS Entity Model to attach to my db, and everything has worked fine. But I have a stored proc that returns a list that has two columns (one int and one text column) and I am trying to bind to a dropdownbox. The examples seem to show returning a single column or returning a data type of one of the tables. But my stored proc...

Drop Down Date Delivery

Hello, I want to use a asp.net drop down to present the user a delivery date on checkout. What I'm not sure about is how to get the specific dates. What the user should see and be able to select in the drop down is the next Monday and Tuesday for the next two weeks. Any help would be appreciated. thanks. ...

Get all dropdown item with separator

Hello, I have this : <select id="CheckList" multiple="multiple"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> </select> Is it possible with jQuery to get a full list of the options with separator bewteen like this : 1,2,3,4 Thanks, ...